I recently started development in ASP.NET, and coming from a PHP background I sprinkle code into the aspx pages using <% %> to control logic.
I'm not debating the best practices of only using code behind, but one strong point in that directions favor is a problem I am experiencing.
Whenever I go into Design view of a page that has code in the aspx file like I mentioned, and make modifications, randomly all the <% %> blocks -shift- in my aspx to what seems like random spots.
This obviously royally messes up my control logic, and after redoing all the internal code 10+ times (yes yes, I'm too lazy to just bite the bullet and move it to code behind), I'm really curious how Visual Studio could make such a mistake?
It even goes so far as to remove some of the <% %> blocks completely (causing missing close braces in my code).
If anyone can help me solve this issue, or knows it can't be resolved, I would greatly appreciate knowing.