Top 3 Products & Services
1. 2. 3. |
Dated: Oct. 02, 2005
Related Categories
Active Server PagesBy Najmi
ASP.NET pages have several semantic changes from existing ASP pages. The following issues are the ones most likely to affect you:
- ASP.NET pages only support one language on a single page.
ASP allowed multiple languages to be used on a single page, which was useful for script library scenarios. Because of ASP Net's compiled nature, it supports only a single language on a page. However, it is still possible to have multiple pages, each with a separate language, within a single application. User Controls might also have a different language from the page that contains them. This enables you to integrate functionality written in different languages in a single page. This is an adequate substitute for the multiple-language Include files that are prevalent in traditional ASP applications.
- ASP.NET page functions must be declared in
<script runat=server>
blocks.
In ASP, page functions could be declared within<% %>
blocks:
<%
Sub DoSomething()
Response.Write "Hello World!"
End Sub
DoSomething
%>In ASP.NET, page functions must be declared in
<script runat=server>
blocks:
lt;script language="VB" runat=server>
Sub DoSomething()
Response.Write ("Hello World!")
End Sub
</script>
<%
DoSomething()
%> - ASP.NET does not support page-render functions.
In ASP, page-render functions could be declared with
<% %>
blocks:
<% Sub RenderSomething() %>
<font color="red"> Here is the time: <%=Now %> </font>
<% End Sub %>
<%
RenderSomething
RenderSomething
%>In ASP.NET, this must be rewritten:
<script language="VB" runat=server>
Sub RenderSomething()
Response.Write("<font color=red> ")
Response.Write("Here is the time: " & Now)
End Sub
</script>Summary
- With three exceptions, ASP.NET is 100% API-compatible with traditional ASP. The API changes are that, now, Request(), Request.QueryString(), and Request.Form() all return individual strings, rather than string arrays.
- ASP.NET pages support only a single language.
- ASP.NET page functions must be declared in
<script runat=server>
blocks. - Page-render functions are not supported.
Now that you've gotten free know-how on this topic, try to grow your skills even faster with online video training. Then finally, put these skills to the test and make a name for yourself by offering these skills to others by becoming a freelancer. There are literally 2000+ new projects that are posted every single freakin' day, no lie!
![]() Previous Article | ![]() Next Article |