Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Meta Tags and UserControls 1

Status
Not open for further replies.

DotNetBlocks

Programmer
Apr 29, 2004
161
US
Hello,
I need some help. I can not find any examples for vs2003 to add meta tags dynamicly to a page. Does any one have any ideas?

Thanks,
Babloome
 
Babloome - do you want to change values within the MetaTags? What (our of curiosity) purpose are you trying to serve here - have never seen this question before. Which tags? All of them? (or params within them?)
 
I want to create these with code behind.

Babloome

Code:
        <meta name="description" content="">
        <meta name="keywords" content="">
        <meta name="robots" content="all">
        <meta name="classification" content="">
        <meta name="distribution" content="global">
        <meta name="resource-type" content="document">
        <meta name="revisit-after" content="20 days">


        <STYLE>
        body, div, td, layer { color:#2D2D2D; font-family: Verdana;}
        a:link, a:visited { color: #041CAC; text-decoration:  underline; font-family: Verdana;}
        a:hover, a:active { color:#209688; text-decoration: underline; font-family: Verdana;}
        H3 { page-break-after: always; }
        </STYLE>
 
Try using a LiteralControl and simply setting the Text property.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Some pages i do not have that kind of control. I wish I did. Plus i want the user control to be independet of the rest of the page.

Babloome
 
I don't understand. Why can't you create a new LiteralControl and add it to the page? It will do exactly what you want it to do..


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
i can add a lit with page.controls.add(), but how do i get it between the head tags programmatically?
 
Make sure the head tag has an ID and runat="server" and then just add the controls to the head tag rather than the page.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top