Visual Basic

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

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

By Dan Mabbutt, About.com

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

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Visual Basic

  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.