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

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

By Dan Mabbutt, About.com

4 of 7

The New ASP.NET Controls

Visual Studio .NET Created Control Code

Visual Studio .NET Generated Control Code

This may look like more work in this simple example, but the purpose here is to get the idea in mind. When you start using ASP.NET's full potential, as with the new tags we work with next, you'll discover that ASP.NET actually does a lot of the work for you.

In addition to processing HTML on the server, ASP.NET has a whole new group of server controls that, in some cases, mirror the HTML controls but add a lot more to what they can do. In other cases, these controls are completely new. These new controls are always identified by the asp: namespace prefix. The syntax for these new controls is:

~~~~~~~~~~~~~~~~~~~~~~~~~
<asp:control_name
   id="control_program_name"
   runat="server"
   other attributes depending on the control .../>
~~~~~~~~~~~~~~~~~~~~~~~~~

If you're using Visual Studio .NET to create your application, the HTML for these controls has a lot more in them. Simply doubleclicking a Button control to add it to a form in Visual Studio .NET automatically creates both the aspx file and the vb file seen below ...

Explore Visual Basic
By Category
About.com Special Features

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

Easy ways to connect two computers for networking purposes. 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 2

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

All rights reserved.