We help IT Professionals succeed at work.
Get Started

Need help with Meta Tags positioning

160 Views
Last Modified: 2016-02-26
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

 
    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

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE