In Visual Studio 2008, I've used a nice feature in its XAML editor which breaks a line so that a control's attributes are automatically positioned on new lines: one attribute per line.
Is th开发者_运维百科ere a way to do the same for the HTML editor?
Thank you.
Oded, thank you very much! You gave me an idea on how to apply "one attribute per line" formatting to an ASP.NET document:
- In Visual Studio 2008, right-click on the .aspx file in the Solution Explorer.
- Select "Open With..".
- Select "XML Editor". [Assuming that the XML Editor has been properly configured in Tools->Options prior to doing this.]
- Edit -> Advanced -> Format Document.
This reformats the document so that each attribute is positioned in its own line, and all of them are nicely indented.
Of course, if I later reopen the same file in Web Forms Designer and format it again, it goes back to what it looked like before. But for my purposes (easily finding the required attributes in a large file), this temporary solution is quite sufficient.
Once again, thank you very much!
Best regards,
Dmitriy
精彩评论