Stop VS.Net from reformatting my aspx pages

  • Thread starter Abhishek Srivastava
  • Start date
A

Abhishek Srivastava

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.
 
J

Jim Cheshire [MSFT]

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
(e-mail address removed)

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


--------------------
 
M

Michael Ramey

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.
 
A

Abhishek Srivastava

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.
 
A

Abhishek Srivastava

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 said:
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
(e-mail address removed)

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 <[email protected]>
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: <#[email protected]>
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.
 
J

Jim Cheshire [MSFT]

Abhishek,

There is no hard date yet.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(e-mail address removed)

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 <[email protected]>
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: <#[email protected]>
In-Reply-To: <[email protected]>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <[email protected]>
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 said:
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
(e-mail address removed)

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 <[email protected]>
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: <#[email protected]>
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top