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

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

By Dan Mabbutt, About.com

5 of 7

Coding the First Application

Starting a new ASP.NET Project

Starting a new ASP.NET Project

To code this app using Visual Studio .NET ...

Start Visual Studio .NET and select the "ASP.NET Web Application" Template. I recommend testing it on your localhost IIS server. I typed over the "WebApplication1" part of the name to give it a more meaningful name. You can see how the bottom part of the "New Project" dialog screen from Visual Studio .NET should look in the illustration. You might see a window flash on your monitor that tells you that your application is establishing a connection with IIS.

Visual Studio will open and display a blank web page in "grid layout mode". Make sure the toolbox is displayed and double-click or drag and drop a Label, Textbox, and Button control onto your form. I changed the Text property of the Button to make it more appropriate. Then double click the Button control to open the code window with the initial code for the Button already entered. Then enter the one line of code you need to transfer a the value from the Textbox to the Label.

Label1.Text = TextBox1.Text

It's almost exactly like regular VB.NET coding so far!

Finally, simply click the run icon, select "Start" from the Debug menu, or press F5 to run your app. Your default browser should open at this point with the form you just designed displayed. When you enter something in the textbox and click the button, the same text should display in the label control.

If everything worked great, we're ready to tackle something a lot more real, the CalcPad Web User Control!

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 3

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

All rights reserved.