CementTruck
asked on
Need help with Meta Tags positioning
I have a master page with meta tags. When doing a view source the meta tags appear in sequential order like there is a carraige return or break tag between them.
I have some pages that require me to change the metadescrpition and metakeywords and I do that on the code behind of the actual product page (see code sample below). On page where the codebehind changes the meta tag info the meta tags run together and are hard to read. How do I get the carriage return visual back?
If it's relevant, main page is .aspx, codebehind is .vb
I have some pages that require me to change the metadescrpition and metakeywords and I do that on the code behind of the actual product page (see code sample below). On page where the codebehind changes the meta tag info the meta tags run together and are hard to read. How do I get the carriage return visual back?
If it's relevant, main page is .aspx, codebehind is .vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
DirectCast(Master.FindControl("metadescription"), HtmlControl).Attributes("content") = "Some Text here"
DirectCast(Master.FindControl("metakeywords"), HtmlControl).Attributes("content") = "More Text Here"
Page.Title = "Title info here"
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
B-) glad to help. Thx for the grade and points!
ASKER
Thanks for your response.
At first I thought there was something wrong with my code then someone told me that because it was rewritten programmatically on the codebehind page that it was then rewritten with an eye towards space conservation. There isn't anything wrong with my code.
I was already using notepad in exactly the way you mentioned. I'm working on a large project with many pages on a public facing site and I can't quickly do a view source to check my work.