I''m working with BA 2.0 and I need to get rid of the unnecessary spaces in my page title. I found a way to remove those lines on the net and applied it to my other website. But I can't apply it to the blog...
Usually in the source code of every asp.net page the <title> element is displayed incorrectly because asp.net adds unnecessary line breaks and the code appears like:
My new blog
instead of <title>My new blog</title> and it is wrong in terms of seo. What I did to my website was:
- I applied <asp:Literal> control for the title on my master page and removed the runat="server" attribute from the head
- on the default page (or any other page) source code file, I added text to the literal control by first finding the right control with "Master.FindControl"
But it doesn't work on the blog because when I removed the runat="server" from the head element of the theme's master page, of course I get an error. The error is "Object reference not set to an instance of an object".
How do I proceed? Or maybe you know another way to get rid of those spaces?
I would appreciate your help!