ASPX designer always reformats code.

Visual Studio .Net

    Next

  • 1. MS VIsual Studio 2002 and .NET Framework 1.1
    Hi, I have installed .NET Framework 1.1, but my Visual Studio.NET 2002 keep showing the .NET Framework v 1.0 (in a menu help\about...) What should I do in order to force Visual Studio to use the newer framework 1.1? Thanks, Lubomir
  • 2. Unspecified Error with Asp.net Dataset Creation
    Hello, I'm using c# web forms to create a page with data-binded controls. After creating the sql data adapter and selecting Generate Dataset, I get an Unspecified Error. The same happens for another data adapter and another page within the same project/solution. In another solution everything is fine. Did you guys figure this one out? I've seen a few posts on the web but no solutions. Thanks, Alen
  • 3. .chm file not works when built with script but works with IDE buil
    Hi, I am working on a problem that a .chm file built through IDE (2003 .NET) works fine, but if I run script build (script call devenv to build the sln), the .chm file doesn't work. Neither of the buildings has any error at all. What should I look at? Thanks, Peter
  • 4. Setting location of Form oject
    In my addin, a Form is invoked and displayed from a named command via the ShowDialog() method. Windows also places the form in the same (irritating) location. I have tried explicitly setting the Top, Left, and Location properties of the Form, as well as all the StartPosition property with all five of the relevant FormStartPosition constants. Ideally, I would like to have the Form appear centered over the VS IDE. How can I programmatically position my form prior to display? TIA. --Bob Bob Steagall Medical Numerics, Inc.

ASPX designer always reformats code.

Postby VHJldm9yIE1vcnJpcw » Fri, 08 Oct 2004 04:15:02 GMT

When I switch from HTML to Design view in my *.aspx pages, if I haven't saved 
my changes, the code inside of any asp:DataGrid controls get reformatted.

If I add any controls to a page, the asp:DataGrid also gets reformatted.

Is there a way to avoid this code reformatting?  It sure makes the code much
less readable, and causes diffs to go haywire, too.

Thanks,
Trevor


Similar Threads:

1.XML Schema Designer, Reformat,VS .net 2003

2.Stop VS.Net from reformatting my aspx pages

Hello All,

I am developing a page which has a complex layout. This layout cannot be 
made using VS alone, so I have to go into the html view and edit the 
html myself.

The problem is that everytime I save the file, (or add/remove any 
component to the page) VS.Net reformats and re-edits the whole page.

I find this very irrating because VS.Net totally disorganizes my code. 
It removes all the quotes so align='center' becomes align=center

<td>
	Hello
<td>

becomes
<td>
	Hello</td>

I capitalizes / decapitalizes strings arbitrarily.

sometimes it also adds some extra </tr> to my code making my layout go 
haywire.

I want to know if there is someway I can tell it to stop reformatting 
and re-editing my code.

regards,
Abhishek.

3.How to avoid reformatting code ?

Hi,

While developing in Vs.Net 2003, when I go to the designer and change
something, even small changes, my HTML code gets horrible reformated.
I'd rather would like to Visual Studio just add/change code surrounding
my changes.
Is there anyway to stop this behavior ?

4.Auto Code Reformatting

Is there a way to manually run the Code Reformatting for C# code and aspx 
code? 


5.Porting from VS2003 to VS2005: Code reformatting

No reply on my previous query, so I'll post this again.  I've done a
bit more research in the interim.

I'm trying to find an easy way to port code from the older VS2003
format to the format used in VS2005.  VS2005 uses partial classes to
split off the compiler-generated sections of forms.  It keeps the
editable files uncluttered. 

I generated very simple projects with VS2003 and with VS2005 to
compare the output.  Following are standout differences:

VS2003's Form1.cs gets split into three modules:

   Form1.cs (the new one) has only the constructor and event response
       functions.  Form1 class is declared partial.

   Form1.designer.cs also has a partial Form1 class. 
       This file gets the Dispose() and InitializeComponent()
             functions, and all the dialog objects.
       For some reason, the 'components'  object derives from
            'IContainer' in VS2005 rather than 'Containter'
            (Anyone know about this?)
       The InitializeComponent() function replaces the old
            'AutoScaleBaseSize =' to two new lines:
            'AutoScaleDimensions = ...' and
            'AutoScaleMode = ...'
 
   Program.cs gets the Main() function, now in its own static class.
       VS2005's Main() adds a call to EnableVisualStyles()

----------------------

Those appear to be the main differences.  I'm not sure if the compiler
flags are changed, but the code changes seem like they could be done
with a reformatting program.  Given the vast body of VS2003 code
with big clumsy dialogs, it would make sense to have a reformatter.

So...does it exist?

6. Can I customize "Pretty Listing (reformatting) of code "

7. Visual Studio 2003 reformats/removes HTML code in Design mode

8. VS C# Express destroys template code via forced reformatting of co



Return to Visual Studio .Net

 

Who is online

Users browsing this forum: No registered users and 40 guest