how to get VS.NET to stop rewriting my code?

M

Max

I've got a comment that dreamweaver uses that VS.NET keeps moving. I'm
wondering if there anyway to stop VS.NET from moving my code around

VS.NET changes:
</body>
<!-- InstanceEnd -->
</HTML>

to:

<!-- InstanceEnd -->
</body>
</HTML>

I don't understand why VS.NET won't let me put a comment where I want it?

-Max
 
A

Adie

Max said:
I've got a comment that dreamweaver uses that VS.NET keeps moving. I'm
wondering if there anyway to stop VS.NET from moving my code around

VS.NET changes:
</body>
<!-- InstanceEnd -->
</HTML>

to:

<!-- InstanceEnd -->
</body>
</HTML>

I don't understand why VS.NET won't let me put a comment where I want it?

Try

Tools -> Options -> Text Editor -> HTML/XML -> Format
Now read the top two options, uncheck, test.

I think there's a bug with this, but it's worth a go.
 
R

Rob Meade

...
I've got a comment that dreamweaver uses that VS.NET keeps moving.

On a similar note I have noticed that depending on what controls I add,
VS.Net also changes the case of my code - whilst this isn't a huge issue, I
do like things to be the same, an example of which would be adding
<asp:panel> tags - any HTML in between this seems to be uppercased....

I know its note quite the same as your problem Max, but if anyone has any
knowledge of how to turn this off to leave the case as I entered it I would
be most grateful.

Regards

Rob
 
H

Hans Kesting

Rob Meade said:
...


On a similar note I have noticed that depending on what controls I add,
VS.Net also changes the case of my code - whilst this isn't a huge issue, I
do like things to be the same, an example of which would be adding
<asp:panel> tags - any HTML in between this seems to be uppercased....

I know its note quite the same as your problem Max, but if anyone has any
knowledge of how to turn this off to leave the case as I entered it I would
be most grateful.

Regards

Rob

On a similar note I have noticed :) that when I add a table using the
menu, all tags are uppercase. However, when I add a row by hand
the tags are forced to lowercase! Hardly a problem, it just doesn't look
nice.
A feature the lowercases all html tags I can understand (IIRC xhtml
requires lowercase tags), but that should then be used consistently.

Hans Kesting
 
R

Rob Meade

...
A feature the lowercases all html tags I can understand (IIRC xhtml
requires lowercase tags), but that should then be used consistently.

indeed - consistancy would be good - I ALWAYS try to make my code look good,
even from the point of the HTML output being corrected indented - just think
its nicer to read :eek:)

I've found that VS.net nauses this up from time to time, with the dropping
of code left align after I've spent ages making it all look pretty- the
bugger :eek:)

EditPlus2 is a nice little text editor by the way, and that has a built in
feature for uppercasing/lowercases selected text (cntrl-L - cntl-U) - shame
VS.net doesnt have this eh..

Rob
 
S

Shawn

Ctrl + Shift + U will make your selection into uppercase in VS.NET. And
Ctrl + U will make your selection into lowercase.

Shawn

...
A feature the lowercases all html tags I can understand (IIRC xhtml
requires lowercase tags), but that should then be used consistently.

indeed - consistancy would be good - I ALWAYS try to make my code look good,
even from the point of the HTML output being corrected indented - just think
its nicer to read :eek:)

I've found that VS.net nauses this up from time to time, with the dropping
of code left align after I've spent ages making it all look pretty- the
bugger :eek:)

EditPlus2 is a nice little text editor by the way, and that has a built in
feature for uppercasing/lowercases selected text (cntrl-L - cntl-U) - shame
VS.net doesnt have this eh..

Rob
 
R

Rob Meade

...
Ctrl + Shift + U will make your selection into uppercase in VS.NET. And
Ctrl + U will make your selection into lowercase.

Hi Shawn,

Thats absolutely marvellous - cheers - I can tidy it all up again :)

Regards

Rob
 
M

Max

It seems these options don't affect anything. For what it's worth, I did see
an option for setting tags to uppercase and lowercase. But again, it doesn't
seem to matter what you set these options at.

-Max
 
M

Max

Ok, nice macro, but forgive me for not even attempting to use it.

VS.NET deletes, duplicates, and rearranges the comment tags as well as a lot
of HTML tags. For example, last time I brought a page into VS.NET and the
title tag was gone. I don't see how this macro can remember what tags were
deleted.

I've been able to get by just manually rewriting the HTML before saving on
this very small project I'm doing as an experiment. But I can't possibly put
up with this on larger projects.

There has to be a fix for this? If VS.NET is going to harm well formatted
HTML then there needs to be an OFF switch.

*sigh*
 
K

Karun

Welcome to the club! You can take heart from the fact that you are not
the only one who has this complaint. Look at this link for a complete
discussion about this issue:

http://groups.google.com/[email protected]#link1

This problem arises because the HTML editor depends on Frontpage. And
since Frontpage plays around with the HTML code, VS.NET does the same.

The good news is that Microsoft has detached Frontpage from their HTML
editor in Whidbey. And it looks much better from what I have seen so
far.

Karun.

Max said:
Ok, nice macro, but forgive me for not even attempting to use it.

VS.NET deletes, duplicates, and rearranges the comment tags as well as a lot
of HTML tags. For example, last time I brought a page into VS.NET and the
title tag was gone. I don't see how this macro can remember what tags were
deleted.

I've been able to get by just manually rewriting the HTML before saving on
this very small project I'm doing as an experiment. But I can't possibly put
up with this on larger projects.

There has to be a fix for this? If VS.NET is going to harm well formatted
HTML then there needs to be an OFF switch.

*sigh*

<snip>
 
M

Max

Thanks Karun.

Now I'm off to the Dreamweaver newsgroup to see how to get DW to stop
rewriting my VS.NET pages. I swear I'm in a bad dream.

-Max
 

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,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top