VisualStudio 2003 sometimes (randomly) performs automatic formatting on html pages when switching between Design view and code view. Unchecking the relevant option checkboxes has no effect. I've Googled, and saw other people have the same problem.
I assume this is a known bug in VS.. Will it be fixed in Whidbey? It drives me pretty mad
If anyone has registry hacks to solve this, they are quite welcome.
It is annoying indeed. It was mentioned at PDC 2003 and a gigantic cheer echoed throught LA Convention Centre when it was announced that this would be fixed in VS 2005. Apparently XHTML will be properly supported, plus a host of other nice HTML features.
Until then, just Ctrl-Z the thing if it happens.
Don't suppose they're going to fix the "feature" where it removes the runat=server attribute from controls whenever I add a new control to the page, eh?
When does it remove it? For certain forms elements (input)
You need the runat="server". If it isn't there how is ASP.NET going to know the tag runs at the server? Often you use it for hidden fields on forms:
<input type="hidden" id="foo" runat="server" />. You then set the value server-side:
foo.Value = "bar". Taking this off would not be a good idea.
I know you probably normally won't use <asp:Label id="label" /> client-side, but you could set up a DOCTYPE that uses this.
Man I wish there was a registry hack for this. I do not use design view because of this. Speaking of auto formatting I use vb.net for my day job but for everything outside of work I use c#. When I use c# the ide doesn't try to finsish/format everything
I write. Is there a way to disable some of the auto features when writing vb.net?
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.