By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,314 Members | 1,722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,314 IT Pros & Developers. It's quick & easy.

How to dynamically change page meta tags?

P: n/a
To dynamically change something on an ASP.NET web page a literal control
(and others) can be used. But how can a non-visual element, like a page
meta tag, be changed dynamically?

Thanks for your help.
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
What I've done is make a variable public. Example:

public string metatag="";

Metatag = "<meta keyword=\"golf\">";

..aspx

<%=metatag%>

Hope this helps,

Manit

"Bruce W...1" <br***@noDirectEmail.com> wrote in message
news:3F***************@noDirectEmail.com...
To dynamically change something on an ASP.NET web page a literal control
(and others) can be used. But how can a non-visual element, like a page
meta tag, be changed dynamically?

Thanks for your help.

Nov 18 '05 #2

P: n/a
Manit Chanthavong wrote:

What I've done is make a variable public. Example:

public string metatag="";

Metatag = "<meta keyword=\"golf\">";

.aspx

<%=metatag%>

Hope this helps,

Manit

================================================== =

That works. How interesting. Thanks.

What is this <% =whatever %> notation? I'd like to explore this more.
Is there a name for this? I can't find anything in the documentation.
Nov 18 '05 #3

P: n/a
<%=whatever%> or <% Response.Write("asf") %>

this is inline scripting.

Thanks,

Manit Chanthavong

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4

P: n/a
You can use Response.Appendheader or response.addheader to add your meta tag
or update your meta tags,

For more details, check out this article
http://www.extremeexperts.com/Net/Ar...rSessionTimeou
t.aspx

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Bruce W...1" <br***@noDirectEmail.com> wrote in message
news:3F***************@noDirectEmail.com...
To dynamically change something on an ASP.NET web page a literal control
(and others) can be used. But how can a non-visual element, like a page
meta tag, be changed dynamically?

Thanks for your help.

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.