Last post Oct 20, 2009 11:47 PM by Paulo Abreu
Oct 16, 2009 08:50 AM|Paulo Abreu|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 11:35 AM|x_com|LINK
Try this XHML's doctype:
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
Check this link for further details:
Oct 16, 2009 12:27 PM|Paulo Abreu|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 06:39 PM|Eilon|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 11:47 PM|Paulo Abreu|LINK
I'm not having any issue. It's "ugly".
I really don't like that kind of magic
Thank you for your reply.