Why would anyone want to not use a code behind file so that server sided code is separated from markup? Wasn't that supposed to be one of the advantages of .NET over classic ASP?
Personally, I think mixing code with markup makes the code a lot harder to understand.
I hate to see those darn <% %> (server sided blocks) inter-spliced in with markup, yuck. I would expect that this is in ASP.NET solely for backward compatibility with Classic ASP but I see examples from MS all the time that include those yellow brackets.
I am trying to understand a code example which is available for download here and puzzled at why any of my server-sided breaks shown here don't break when executing the code even though I see that has been set in the web.config. Since I usually work with code-behinds, I am wondering if there is something about server-side code in the aspx that is handled differently that is preventing me from debugging the runat=server code.
So. My questions are:
1) Why would anyone want to not use a code behind file so that server sided code is separated from markup?
2) Why might I not be able to break on the server sided logic?
Your insight and opinions are also welcomed on any of my related comments.