Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!


Sponsored Content

 

 
 

Photo
- - - - -

Dynamically Generated Meta Tags With Vb.net


  • Please log in to reply
No replies to this topic

#1 JeffSmith_NH

JeffSmith_NH

    HR 3

  • Active Members
  • PipPipPip
  • 50 posts
  • Location:New Hampshire

Posted 13 November 2004 - 01:49 PM

To dynamically generate your META tags with VB.Net:

Add an ID tag to your Meta tag and set the runat attribute to "server":

<meta id="MetaDesc" runat="server"></meta>

The closing tag is required.


In the code behind page, declare the control as an HTMLGenericControl

Protected MetaDesc As System.Web.UI.HtmlControls.HtmlGenericControl


In the Page_Load event, set the name and content attributes.

If IsPostBack = False Then
MetaDesc.Attributes("content") = "x"
MetaDesc.Attributes("name") = "description"
end if


x is the dynamically generated value




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users