HTML AutoFormatting (with an actual question)

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Michael J. Mooney (mike_mooney_at__yahoo.com.NOSPAM)
Date: 06/14/04


Date: Mon, 14 Jun 2004 13:53:19 -0400

I have resigned myself that to the undeniable fact the VS.NET (2003) will
attempt to reformat my HTML tags, making my code almost completely
indecipherable, any time I switch to the Design tab.

Of course, this is ridiculous. However, since it quite simply cannot be
solved, my approach is to NEVER switch to the Design tab. If I do
accidentally, regardless of whether the file becomes marked with a "*"
indicating that it was changed, I immediately close the file, discarding all
changes. I believe, but have not proven, it VS.NET is sometimes saving it's
modifications to the file, because new HTML formatting still shows up now an
then.

I just did it again by accident, and it turned my file into 317 lines of
unreadable junk. It should take at least a half hour, probably more like an
hour and a half, to return the file back to a readable state. Whoever at MS
implemented the logic for this "feature" (which actively sabotages your
code), should be fired, plain and simple (IMHO). (I said I resigned myself
to it, I didn't say I wasn't still frustrated and confused by it).

However, my problem now is adding server controls. Usually, when a person
adds a server control to a Web Form, VS.NET automatically adds it
declaration to the .cs code-behind page, along with any declaration which is
necessary. However, this only happens when the Web Form is viewed in Design
view; if you add the control to the HTML view, it does not appear in the
code-behind page unless you switch to Design view.

So, my question is: Is there any shortcut key or macro in VS.NET which will
synchronize the local variable declarations in the code behind page with the
runat="server" (no, MS, not runat=server) controls declared in the HTML
page, without (of course) switching to Design view?

Thanks,

-- 
Michael J. Mooney
MCP+SB, MCAD, MCSD


Relevant Pages

  • Re: HTML AutoFormatting (with an actual question)
    ... Is there any way in VS.NET 2003 to complete disable the Design ... I want to make sure that I never switch to it, ... my problem now is adding server controls. ... > declaration to the .cs code-behind page, ...
    (microsoft.public.vsnet.ide)
  • Re: Is Publisher 2003 an effective way of creating and managing a
    ... Why is it bad to use these programs to produce proprietary html code, ... for years -- until Firefox came along. ... Web designers of the world, who were expected to design separate sites ... Word and Publisher are primarily programs for print ...
    (microsoft.public.publisher.webdesign)
  • Re: ASPX now with methods and classes
    ... > - color coding of html and javascript and dhtml dom ... > - volatile storage (session object) ... >> ASP.NET, from the Page class to all of the server controls, is nothing ... >> but a bunch of rendering libraries. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASPX now with methods and classes
    ... - color coding of html and javascript and dhtml dom ... - volatile storage (session object) ... > ASP.NET, from the Page class to all of the server controls, is nothing ... > but a bunch of rendering libraries. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: OT- building a lightwave website
    ... directly to people who use HTML, flash,dreamweaver,inDesign etc everyday. ... Im assuming that you are more of the design angle. ... In programming, it either works or it doesnt, ... figure out how to convert it into a website. ...
    (comp.graphics.apps.lightwave)