Tutorial-Web Home > An Overview in the Differences Between ASP and ASP.net > Section 2: ASP.net Differences 1
|
Rendered Ineffective
The largest basic programming difference between ASP and ASP.net is the lost ability to program page-render functions. This means there will no longer be ASP functions with HTML intertwined throughout. I perceive this as the most radical change for current ASP programmers. One of the strengths of ASP was to easily drop functions into existing HTML web pages without much re-coding. ASP.net requires any HTML that appears within functions to be written to the screen using the response.write function. ASP:
<%Asp.net:
<%Declaration of Independence from <% When a function is declared in ASP.net it must appear in a <script runat=server> block with the language declared. The days of <% %> whenever ASP was needed are gone. We must be careful to make sure our functions exist in these blocks or else they will generate an error. ASP:
<%Asp.net:
<script language="VB" runat=server> An added change that you may notice as well is that function calls require that the parentheses () appear after the function name. I have gotten it to work without the parentheses but I think officially it is required.
|
Section 2: ASP.net Differences 1 Section 3: ASP.net Differences 2 Section 4: Final Differences and Conclusion
![]()
| ||||||||||||
Counter