Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 20, 2009 10:47 PM by Paulo Abreu
Oct 16, 2009 07:50 AM|LINK
When I do 'source view' in my browser I realize that all xhtml that I provide between <head> tag are 'reformatted' by asp.net mvc engine, that is, my indentation is lost. The exception seems to be with <script> tag.
Is there any way to force asp.net to respect my indentation?
Oct 16, 2009 10:35 AM|LINK
Try this XHML's doctype:
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
Check this link for further details:
Oct 16, 2009 11:27 AM|LINK
Hello, thank you for you attention.
Unfortunatly is not a doctype problem. I tryed your tip and didn't work. I am using XHTML 1.0 Strict.
Oct 20, 2009 05:39 PM|LINK
In the default MVC template the <head> tag in the Site.master file (in the ~/Views/Shared folder) is marked as runat="server". This special attribute gives the tag additional behavior that in some cases is nice, and in other cases it can cause formatting
problems. You can remove the runat="server" attribute from the <head> tag but that can cause certain URLs to map incorrectly.
Is the difference in indentation causing any issues or is it just "ugly"?
Oct 20, 2009 10:47 PM|LINK
I'm not having any issue. It's "ugly".
I really don't like that kind of magic
Thank you for your reply.