Visual Studio HTML IDE

C

Craig Hunt

I posted this in another newsgroup, so please forgive me if you've already
seen it.
---

Am I missing something here?

Quite frequently, I'll write an aspx document taking care to format the HTML
so that I and others on my team can read it. <sarcasm>We kind of like to
know what's going on when we come back to the document later.</sarcasm> In
any case, the editor, when switching from HTML view to the designer view
will do crazy things like completely remove all of the formatting in the
HTML as well as remove style and other attributes, and it will even remove
the quotes from the attributes it leaves in place.

I've checked the options for my IDE, and I've turned off HTML validation and
unchecked the Apply Automatic Formatting boxes. Is there another setting I
need to check to get the IDE to leave my HTML as I enter it. I'm really
getting tired of having to fix the IDE's screw ups because it REALLY doesn't
know how to write HTML.

TIA for any assistance.

Craig
 
J

Juan T. Llibre

As others have pointed out, this is a WKP (well-known problem) with
VS.NET 2002 and VS.NET 2003, which has been fixed in VS.NET 2005.
 
C

Craig Hunt

My apologies to the group.

I found the answer to my question about five seconds after I hit send.

Too late to retrieve the message at that point.

Thanks for the reply.

Cheers!
 
K

Ken Dopierala Jr.

Hi Craig,

It is a known problem. To get around the missing quotes thing don't switch
between Design & HTML views while your app is running in the IDE. If you do
and your quotes go away then when your app is stopped make a small change in
HTML view then switch to Design view and back to HTML view and everything
should have quotes again. Annoying workaround, but it has saved me some
time. Good luck! Ken.
 
J

Juan T. Llibre

Quite a bit, poppybush.

Check out the possibilities in "Tools", "Options", "Text HTML Editor",
and see all the stuff that you can customize in "Tag Specific Options".

Also, if you check "Show all settings", after "Tools", "Options",
you can scroll down to "Text Editor" and the "HTML",
for a bundle of additional settings you can customize.

You can even customize language-specific stuff.
 
R

Rhywun

The tag-specific formatting in VS2005 still needs a little work. End
tags wind up all clustered on one line in the same annoying manner that
VS2003 provided:

<ol>
<li>one</li>
<li>two</li></ol>

Even if you tell it to insert a line-break before the ending </ol> tag,
it doesn't happen... unless there is a space before the end tag. But
who is going to remember to separate all their tags with spaces?
 
A

Alan Silver

The tag-specific formatting in VS2005 still needs a little work. End
tags wind up all clustered on one line in the same annoying manner that
VS2003 provided:
<snip>

And have you discovered that setting the indent for HTML to zero still
gives indented HTML?

And why does *every* single tag have a separate closing tag? For
example, when you add a Literal, you get...

<asp:Literal ID="" Runat="Server"></asp:Literal>

Why would I want that? I can't think of a single good reason to separate
out the closing tag. Sure, some controls are very likely to want it, but
many aren't. You don't seem to have the choice.

Close, but still so far ;-(
 
P

PL

And why does *every* single tag have a separate closing tag? For example, when you add a Literal, you get...

What a lot of wining, does an extremely unimportant thing like that really bother you ?
Close, but still so far ;-(

How do you ever get past one single day of programming ? I think you better
take a look at you life and decide if you want to continue with programming
if a small thing like that bothers you that much.

PL.
 
J

Juan T. Llibre

Hi, Alan.

That behavior is really a disgrace, since the default code
for the Literal tag is without the separate closing tag :

http://beta.asp.net/QUICKSTART/util...samples/ctrlref/standard/Literal/Literal1.src

To make this a bit more bearable, did you know that
you can add custom text snippets to VS 2005's Toolbox ?

Just write your tag, formatted the way you like it :

<asp:Literal ID="" Runat="Server"></asp:Literal>

and drag it into the Toolbox.

When you drag that Text snippet into any file,
it will be inserted exactly as you wrote it.

I agree, the Literal, and other controls, should have a closing tag in its
own line, instead of a closing tag separated from the code, but using
the text code snippets help alleviate that pain.

Have you bugged that behavior at the Feedback Center ?
That's the best way to get VS features modified.
 
A

Alan Silver

Hi, Alan.
That behavior is really a disgrace, since the default code
for the Literal tag is without the separate closing tag :

http://beta.asp.net/QUICKSTART/util/srcview.aspx?path=~/aspnet/samples/c
trlref/standard/Literal/Literal1.src

Oh well, at least I'm not alone!!
To make this a bit more bearable, did you know that
you can add custom text snippets to VS 2005's Toolbox ?
<snip>

I knew in theory, but haven't explored far enough to do it myself. I
find it a bit of a shame that I have to do this myself, but at least
once it's done, I can have it how I want it.
Have you bugged that behavior at the Feedback Center ?
That's the best way to get VS features modified.

No I haven't. Where do you go to log such things?

Ta ra
 
A

Alan Silver

Where do you go to log such things?
http://lab.msdn.microsoft.com/productfeedback/

You can make suggestions or file bug reports. You'll need a Passport
account to be able to post there.

Thanks, I've logged two things there, this one and the fact that you
don't seem to be able to turn off HTML indenting. Again, not
earth-shattering, but annoying to those who like neat code.

Thanks for the link. Ta ra
 

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

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top