How to dynamically change page meta tags?

  • Thread starter Thread starter Bruce W...1
  • Start date Start date
B

Bruce W...1

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.
 
What I've done is make a variable public. Example:

public string metatag="";

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



..aspx

<%=metatag%>

Hope this helps,

Manit
 
Manit said:
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.
 
<%=whatever%> or <% Response.Write("asf") %>

this is inline scripting.



Thanks,

Manit Chanthavong
 
Back
Top