Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Bidding Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 07-25-2004, 12:16 PM   #1 (permalink)
Inactive
 
Join Date: 07-25-04
Location: Pittsburgh
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

mattchewpa is liked by many
ASP and meta tags

I have a problem with my meta tags. Can anyone give me some advice please. I need to populate the meta tags depending on the department ID. The result needs to display the meta tags on the page for each department. Would I use a variable that would be populated dependent on a condition? Would this work or should I try a different approach.

I am under the impression that for your meta tags to work properly the search engine indexers needs to see this code just as it would appear in "viewe source".

Any suggestions or thoughts would be appreciated.
mattchewpa is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 07-25-2004, 12:52 PM   #2 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,941
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
You could try something like this.

[code:1:531d3a8064]<%@Language=VBScript%>
<%Response.Buffer = True%>
<%
Dim M
Dim x_meta_desc
Dim x_meta_keywords

M = Request.QueryString("id")
If M="" or isnull(M) then
M=Request.Form("id")
End If
If key="" or IsNull(key) Then
M=0
End If

Select Case M
Case 1
x_meta_desc = "123"
x_meta_keywords = "123"
Case 2
x_meta_desc = "xyz"
x_meta_keywords = "xyz"
Case Else
x_meta_desc = "123xyz"
x_meta_keywords = "123xyz"
End Select
%>

<HTML>
<HEAD>

<TITLE>passing values</TITLE>
<meta name="description" content="<%=x_meta_desc%>">
<meta name="keywords" content="<%=x_meta_keywords%>">
</HEAD>

. . .[/code:1:531d3a8064]

imaginemn
__________________
Imagine Creative Services
Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-25-2004, 05:56 PM   #3 (permalink)
Inactive
 
Join Date: 07-25-04
Location: Pittsburgh
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

mattchewpa is liked by many
Thank You.... but what about the Select Case structure.

Thank you for your input. I see how that will work. Wont the Select Case get to long for the page. Could I have that as a subfunction or its own seperate file.

Again Thanks for the input. I think Iam getting on the right track here.
mattchewpa is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-25-2004, 06:31 PM   #4 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,941
iTrader: 0 / 0%
imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
You could execute this code as an include file like meta_tags.asp. Just to seperate the code and to include it in multiple pages. A sub class would not be better or faster than a select or elseif statement in asp.

imaginemn
__________________
Imagine Creative Services
Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with meta tags. docquesting SEO Forum 134 03-17-2008 04:34 PM
Do these META tags help SEO? m2k SEO Forum 12 08-11-2004 06:15 AM
New to meta Tags? oakfarm Google Forum 2 04-07-2004 12:11 AM
Meta Tags?? a1c1e19 Coding Forum 4 03-21-2004 03:45 AM
Different meta tags TanyaMartin Google Forum 46 03-13-2004 09:15 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 06:54 PM.
© Copyright 2008 V7 Inc