Stop VS.Net from reformatting my aspx pages

Discussion in 'ASP .Net' started by Abhishek Srivastava, Feb 9, 2004.

  1. 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.
     
    Abhishek Srivastava, Feb 9, 2004
    #1
    1. Advertising

  2. HI Abhishek,

    Have you tried changing the options in Visual Studio .NET so that it
    doesn't reformat code? If you've already done that and the problem
    remains, I'm afraid that's all that you can do. The story here is not a
    very good one. We are dependent upon MSHTML, the HTML rendering engine we
    use in VS.NET. Unfortunately, MSHTML sometimes doesn't do a good job of
    preserving your code formatting exactly the way you're formatted it.

    The good news is that we've worked extremely hard to address this in
    Whidbey, the next version of Visual Studio .NET.

    Jim Cheshire, MCSE, MCSD [MSFT]
    ASP.NET
    Developer Support


    This post is provided as-is with no warranties and confers no rights.


    --------------------
    >Date: Mon, 09 Feb 2004 17:54:33 +0530
    >From: Abhishek Srivastava <>
    >User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6b)

    Gecko/20031208
    >X-Accept-Language: en-us, en
    >MIME-Version: 1.0
    >Subject: Stop VS.Net from reformatting my aspx pages
    >Content-Type: text/plain; charset=us-ascii; format=flowed
    >Content-Transfer-Encoding: 7bit
    >Message-ID: <#>
    >Newsgroups:

    microsoft.public.vstudio.development,microsoft.public.dotnet.framework.aspne
    t
    >NNTP-Posting-Host: atlrel2.hp.com 156.153.255.202
    >Lines: 1
    >Path:

    cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.
    phx.gbl
    >Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:208534

    microsoft.public.vstudio.development:4309
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >
    >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.
    >
     
    Jim Cheshire [MSFT], Feb 9, 2004
    #2
    1. Advertising

  3. I think its funny, I posted a question similar to this about two months ago
    and never got a response. You would think this YES un-turn-off-able
    "feature" would cause a pretty big outroar, but very few people mention it.
    I think it's all a conspiracy, Microsoft wants to standardize HTML output,
    and our monitors aren't compatible with the mind probe they are using to
    control everyone else's brain to just accept the badly formatted tags. No
    wait, I've been watching too much TV, actually I heard once there should be
    an option to turn this off in the next release. I know that doesn't provide
    too much comfort to you now, you can do what I had to do... live with it.

    "Abhishek Srivastava" <> wrote in message
    news:%...
    > 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.
     
    Michael Ramey, Feb 9, 2004
    #3
  4. I think ASP.NET Web Matrix supports custom markup layout today (won't "fix"
    personal styles). Info at
    http://asp.net/webmatrix/default.aspx?tabIndex=4&tabId=46.

    "Michael Ramey" <raterus@localhost> wrote in message
    news:...
    > I think its funny, I posted a question similar to this about two months

    ago
    > and never got a response. You would think this YES un-turn-off-able
    > "feature" would cause a pretty big outroar, but very few people mention

    it.
    > I think it's all a conspiracy, Microsoft wants to standardize HTML output,
    > and our monitors aren't compatible with the mind probe they are using to
    > control everyone else's brain to just accept the badly formatted tags. No
    > wait, I've been watching too much TV, actually I heard once there should

    be
    > an option to turn this off in the next release. I know that doesn't

    provide
    > too much comfort to you now, you can do what I had to do... live with it.
    >
    > "Abhishek Srivastava" <> wrote in message
    > news:%...
    > > 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.

    >
    >
     
    Ed Kaim [MSFT], Feb 9, 2004
    #4
  5. I beautify my code. do proper indentation, close all tags. put every
    attribute in quotes. And then savee the file.

    And VS.Net goes and sh*ts all over it. Indentation is totally horrible,
    All my <br/> become <br> align='center' becomes align=center. I hate its
    html editor. (but for complex pages there is no other way but to go in
    html mode and edit.)

    I want to keep my html as well formed as possible. But VS.Net does
    totally the opposite. Which is wierd because VS.Net boasts of XML
    compatibility everywhere ... yet it will remove closed tags from my code??

    I think this is a bug. Atleast programmers should be given a choice
    whether they want to keep all tags closed (except some lage html things
    like <input type'checkbox' selected>) and all attributes in quotes.

    regards,
    Abhishek.

    Ed Kaim [MSFT] wrote:
    > I think ASP.NET Web Matrix supports custom markup layout today (won't "fix"
    > personal styles). Info at
    > http://asp.net/webmatrix/default.aspx?tabIndex=4&tabId=46.
    >
    > "Michael Ramey" <raterus@localhost> wrote in message
    > news:...
    >
    >>I think its funny, I posted a question similar to this about two months

    >
    > ago
    >
    >>and never got a response. You would think this YES un-turn-off-able
    >>"feature" would cause a pretty big outroar, but very few people mention

    >
    > it.
    >
    >>I think it's all a conspiracy, Microsoft wants to standardize HTML output,
    >>and our monitors aren't compatible with the mind probe they are using to
    >>control everyone else's brain to just accept the badly formatted tags. No
    >>wait, I've been watching too much TV, actually I heard once there should

    >
    > be
    >
    >>an option to turn this off in the next release. I know that doesn't

    >
    > provide
    >
    >>too much comfort to you now, you can do what I had to do... live with it.
    >>
    >>"Abhishek Srivastava" <> wrote in message
    >>news:%...
    >>
    >>>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.

    >>
    >>

    >
    >
     
    Abhishek Srivastava, Feb 10, 2004
    #5
  6. > The good news is that we've worked extremely hard to address this in
    > Whidbey, the next version of Visual Studio .NET.


    That's really good news. When is the new edition coming out?

    regards,
    Abhishek.
    Jim Cheshire [MSFT] wrote:

    > HI Abhishek,
    >
    > Have you tried changing the options in Visual Studio .NET so that it
    > doesn't reformat code? If you've already done that and the problem
    > remains, I'm afraid that's all that you can do. The story here is not a
    > very good one. We are dependent upon MSHTML, the HTML rendering engine we
    > use in VS.NET. Unfortunately, MSHTML sometimes doesn't do a good job of
    > preserving your code formatting exactly the way you're formatted it.
    >
    > The good news is that we've worked extremely hard to address this in
    > Whidbey, the next version of Visual Studio .NET.
    >
    > Jim Cheshire, MCSE, MCSD [MSFT]
    > ASP.NET
    > Developer Support
    >
    >
    > This post is provided as-is with no warranties and confers no rights.
    >
    >
    > --------------------
    >
    >>Date: Mon, 09 Feb 2004 17:54:33 +0530
    >>From: Abhishek Srivastava <>
    >>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6b)

    >
    > Gecko/20031208
    >
    >>X-Accept-Language: en-us, en
    >>MIME-Version: 1.0
    >>Subject: Stop VS.Net from reformatting my aspx pages
    >>Content-Type: text/plain; charset=us-ascii; format=flowed
    >>Content-Transfer-Encoding: 7bit
    >>Message-ID: <#>
    >>Newsgroups:

    >
    > microsoft.public.vstudio.development,microsoft.public.dotnet.framework.aspne
    > t
    >
    >>NNTP-Posting-Host: atlrel2.hp.com 156.153.255.202
    >>Lines: 1
    >>Path:

    >
    > cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.
    > phx.gbl
    >
    >>Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:208534

    >
    > microsoft.public.vstudio.development:4309
    >
    >>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >>
    >>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.
    >>

    >
    >
     
    Abhishek Srivastava, Feb 10, 2004
    #6
  7. Abhishek,

    There is no hard date yet.

    Jim Cheshire, MCSE, MCSD [MSFT]
    ASP.NET
    Developer Support


    This post is provided as-is with no warranties and confers no rights.

    --------------------
    >Date: Tue, 10 Feb 2004 10:52:27 +0530
    >From: Abhishek Srivastava <>
    >User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6b)

    Gecko/20031208
    >X-Accept-Language: en-us, en
    >MIME-Version: 1.0
    >Subject: Re: Stop VS.Net from reformatting my aspx pages
    >References: <#>

    <>
    >In-Reply-To: <>
    >Content-Type: text/plain; charset=us-ascii; format=flowed
    >Content-Transfer-Encoding: 7bit
    >Message-ID: <>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >NNTP-Posting-Host: atlrel2.hp.com 156.153.255.202
    >Lines: 1
    >Path:

    cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.
    phx.gbl
    >Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:208791
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >
    > > The good news is that we've worked extremely hard to address this in
    > > Whidbey, the next version of Visual Studio .NET.

    >
    >That's really good news. When is the new edition coming out?
    >
    >regards,
    >Abhishek.
    >Jim Cheshire [MSFT] wrote:
    >
    >> HI Abhishek,
    >>
    >> Have you tried changing the options in Visual Studio .NET so that it
    >> doesn't reformat code? If you've already done that and the problem
    >> remains, I'm afraid that's all that you can do. The story here is not a
    >> very good one. We are dependent upon MSHTML, the HTML rendering engine

    we
    >> use in VS.NET. Unfortunately, MSHTML sometimes doesn't do a good job of
    >> preserving your code formatting exactly the way you're formatted it.
    >>
    >> The good news is that we've worked extremely hard to address this in
    >> Whidbey, the next version of Visual Studio .NET.
    >>
    >> Jim Cheshire, MCSE, MCSD [MSFT]
    >> ASP.NET
    >> Developer Support
    >>
    >>
    >> This post is provided as-is with no warranties and confers no rights.
    >>
    >>
    >> --------------------
    >>
    >>>Date: Mon, 09 Feb 2004 17:54:33 +0530
    >>>From: Abhishek Srivastava <>
    >>>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6b)

    >>
    >> Gecko/20031208
    >>
    >>>X-Accept-Language: en-us, en
    >>>MIME-Version: 1.0
    >>>Subject: Stop VS.Net from reformatting my aspx pages
    >>>Content-Type: text/plain; charset=us-ascii; format=flowed
    >>>Content-Transfer-Encoding: 7bit
    >>>Message-ID: <#>
    >>>Newsgroups:

    >>
    >>

    microsoft.public.vstudio.development,microsoft.public.dotnet.framework.aspne
    >> t
    >>
    >>>NNTP-Posting-Host: atlrel2.hp.com 156.153.255.202
    >>>Lines: 1
    >>>Path:

    >>
    >>

    cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.
    >> phx.gbl
    >>
    >>>Xref: cpmsftngxa07.phx.gbl

    microsoft.public.dotnet.framework.aspnet:208534
    >>
    >> microsoft.public.vstudio.development:4309
    >>
    >>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >>>
    >>>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.
    >>>

    >>
    >>

    >
     
    Jim Cheshire [MSFT], Feb 11, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Curt
    Replies:
    3
    Views:
    1,889
    Sahil Malik
    Jun 18, 2004
  2. Matt Theule

    Stop Debugging doesn't stop in ASP.NET

    Matt Theule, Jul 23, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    774
    Matt Theule
    Jul 24, 2003
  3. Chris Lane
    Replies:
    3
    Views:
    425
    Chris Lane
    Nov 17, 2003
  4. Lloyd Sheen

    Why the reformatting

    Lloyd Sheen, Nov 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    334
    Lloyd Sheen
    Nov 24, 2003
  5. RadioSignal

    passing variables from .aspx.cs code pages to .aspx pages

    RadioSignal, Sep 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    2,380
    Mirronelli
    Oct 22, 2005
Loading...

Share This Page