Lately I was explaining (the little I know about) PHP to someone and I was commenting on how it focuses on embedding code blocks into HTML which are processed server-side and then the .PHP page is sent to the user. For a comparison I mentioned how PHP and ASPX (ASP.NET pages) differs, in that ASPX uses a code behind file or some script code at the top of the page but there's not really any code embedded into the HTML. But it just clicked that this is wrong!
Something clicked today and I browsed to an MSDN site and clarified that code can be embedded into the ASPX page HTML content, similar to PHP and what was done in the ASP days. This site gives a good idea, but one can easily use the "<% %>" to indicate code. So it's like having the benefits of placing code either place ie. embedded (and thus easily viewable relative to your HTML) or neatly tucked away in the code behind file (where I believe 80% of developers put it).
Interestingly, a comment at MSDN stated "Embedded code blocks are supported in ASP.NET Web pages primarily to preserve backward compatibility with older ASP technology." (Ref) Now... to me this is a bit sad as I'd think that keeping it was a good thing because it gives developers the choice and possibly, since this is similar to PHP, you could probably lure some of the PHP following (as I assume is the reason for all these Express tools).
Anyway..., either way, I'm happy its there!
tagged: professional // Comments [4]
Related posts:Select a random row in MS SQL...Regular expressionsVS2005, ASP.NET 2 & DLLs, DLLs..MS's ASP.NET and.. PHP2-way databinding cascading drop down lists within a FormViewApplicationName Property when customising providers
Disclaimer The posts on this blog are provided "AS IS" with no warranties. The opinions expressed herein are my own personal opinions and do not represent any other person's views in anyway.