locked
Microsoft "formatting" options for XML in .aspx files are a dissaster. Can someone please help me?

    Question

  • I've tried several times to configure Visual Studio 2010 to put each and every tag in my .aspx files on its very own line. I don't know what person at Microsoft thought it would be a good idea to lump 40 tags together on a single line but I hope they're getting that person some help. It makes the .aspx files completely unreadable for me. I use the key combination "ctrl-k, d" alot to format my .aspx files and when sometimes when I do this it looks like a tornado came and along and hit my .aspx file. And I shouldn't have to configure individual ASP tags either. Although, even when I have tried to do that with the "formatting and validation" options it appears to ignore my requests.

    Instead of this disaster:

    <asp:Table>
      <asp:TableRow>
        <asp:TableCell>
          <asp:Label ... />
        </asp:TableCell></asp:TableRow></asp:Table>
    
    I want "each and every tag" opening and closing on its "own" line. This, in my opinion, is the most readable. Please let me know if this configuration is possible without a lot of work. I do not want to have to configure each tag individually. Thanks.

    It would also be nice if Microsoft formatting options were consistent throughout different files. They offer the option of putting each attribute on its own line in XML files but do not offer the same option when formatting .aspx files. Why is this?


    System configuration: Winndows 7 RTM, Gigabyte GA-EP45-UD3L motherboard, Intel Pentium Dual-Core E6300 Wolfdale @ 2.8GHz, 4GB PC-1066 DDR2 Patriot Viper Memory, 500 GB Western Digital Hard Disk, GeForce 8800GT Videocard
    Tuesday, November 02, 2010 9:04 PM

All replies

  • I think that you do need to do the individual tags, but don't forget that there is a default setting that you can set. Also, you may be interested in the CTRL+K,F which only reformats the selected code. This may be useful so that you can try some stuff out instead of accidentally reformatting your entire page.


    Nathan Sokalski
    njsokalski@hotmail.com
    http://www.nathansokalski.com/

    "BradleyA" wrote in message news:3350ede4-d966-481b-8cda-b49e512291fd@communitybridge.codeplex.com...

    I've tried several times to configure Visual Studio 2010 to put each and every tag in my .aspx files on its very own line. I don't know what person at Microsoft thought it would be a good idea to lump 40 tags together on a single line but I hope they're getting that person some help. It makes the .aspx files completely unreadable for me. I use the key combination "ctrl-k, d" alot to format my .aspx files and when sometimes when I do this it looks like a tornado came and along and hit my .aspx file. And I shouldn't have to configure individual ASP tags either. Although, even when I have tried to do that with the "formatting and validation" options it appears to ignore my requests.
    Instead of this disaster:


    <asp:Table> <asp:TableRow> <asp:TableCell> <asp:Label ... /> </asp:TableCell></asp:TableRow></asp:Table>

    I want "each and every tag" opening and closing on its "own" line. This, in my opinion, is the most readable. Please let me know if this configuration is possible without a lot of work. I do not want to have to configure each tag individually. Thanks.


    It would also be nice if Microsoft formatting options were consistent throughout different files. They offer the option of putting each attribute on its own line in XML files but do not offer the same option when formatting .aspx files. Why is this?


    System configuration: Winndows 7 RTM, Gigabyte GA-EP45-UD3L motherboard, Intel Pentium Dual-Core E6300 Wolfdale @ 2.8GHz, 4GB PC-1066 DDR2 Patriot Viper Memory, 500 GB Western Digital Hard Disk, GeForce 8800GT Videocard


    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
    Tuesday, November 16, 2010 9:45 PM