|First person to answer get a virtual high five |
I'd take one of those right now.
I can't answer your question though.
High five me anyway.
OK, here's a HIGH FIVE to you.
Maybe I should have said first person with a working solution gets the virtual high five! ha ha
Here's an oldie but a goodie:
I assume you're getting the values in Page_Load for this example:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' Get values from DB
Page.Title = strPagetitle
Awesome. It works.. Any idea how I could do this for meta descriptions or key phrases also?
are you using .NET 4.0? then it is as easy as this:
|Page.MetaKeywords = "These, are my, meta, keywords" |
Page.MetaDescription = "This is my meta description."
Unfortunately not. They are not working. What else can you suggest? HAL
I haven't tested this, but you should get the general idea:
(Add the runat="server" attribute to your the head tag)
Dim hd As HtmlHead = CType(Page.Master.FindControl("Head"), HtmlHead)
Dim mt As New HtmlMeta
mt.Attributes.Add("content", "Place your description here")
mt = New HtmlMeta
mt.Attributes.Add("content", "place, your, keywords, here")
Sorry for not getting back in a while. I had to put this project on hold, but I am back now. We have ASP.NET version 2.0.50727.4211
Is there any harm in upgrading to 4.0?
Shouldn't be that much of a problem from what I am reading.
Thanks. I will look at doing this shortly.