locked
Anyway to stop Visual Studio from modifying .ASPX page on Save? RRS feed

  • Question

  • User-2000768509 posted

    This "feature" is starting to get seriously ridiculous. Had a lot of nested controls that was hard to read, so I went and put some nice comments in between them so I could scroll through and easily see what I was looking at. Click Save, Visual Studio deletes all the comments. Is there a way to disable this functionality? Not remotely the first issue either. I've noticed in several web applications in 2010 and 2012 VS, when you save, it will sometimes delete the final asp:content closing tag. I've had to go in with a text editor before and fix my .aspx page because VS wouldn't stop deleting it.

    Thursday, April 18, 2013 4:37 PM

Answers

  • User1124521738 posted

    you sure you don't have a virus?  I've never seen either server <%-- --%> or html <!-- --> comments or content placeholder controls ever get deleted in VS 2010, but I've seen plenty of viruses rewrite html and aspx pages.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 19, 2013 1:36 PM

All replies

  • User1124521738 posted

    you sure you don't have a virus?  I've never seen either server <%-- --%> or html <!-- --> comments or content placeholder controls ever get deleted in VS 2010, but I've seen plenty of viruses rewrite html and aspx pages.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 19, 2013 1:36 PM
  • User1908258526 posted

    I have to agree with the previous poster here, I've been using VS2012 a lot as of late and although I have experienced some oddities I've never seen VS2012 mangle or change my source files on its own. I also prefer using "closed" ContentPlaceHolder blocks, and I never saw one getting expanded all by it self.

    Something else is at work here, has to be.

    Monday, April 22, 2013 6:12 AM