1. Home
  2. Computing & Technology
  3. Visual Basic

ASP.NET - Learn Programming for the Networked World - Part 1

By , About.com Guide

4 of 6

Two types of coding in ASP.NET

Request to ASP.NET Server

Request to ASP.NET Server

There are essentially two ways that you can write code for an ASP.NET application.

Inline code
~~~~~~~~~~~~~~~~~~~~~~~~~
<html>
  <script language="vb" RUNAT="server">
  Private Sub Page_Load()
    Response.Write _
      ("Hello About Visual Basic!")
    End Sub
  </script>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~

This type of coding is essentially the same as the old ASP code ... with new ASP.NET syntax thrown in. One characteristic of inline code is that you can put it anywhere in your HTML, just like "old" ASP code, and it would execute in that physical sequence. This "sequential processing" is the opposite of "object oriented" processing and the resulting programs can be very difficult to write and maintain. This was one of the main criticisms of "old" ASP systems.

Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Learn ASP.NET
  6. ASP.NET - Learn Programming for the Networked World - Part 1

©2009 About.com, a part of The New York Times Company.

All rights reserved.