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

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

By , About.com Guide

2 of 8

Adding the User Control to the Project

Adding a Web User Control

Web User Control Form Warning

In addition to the VB code, there are a few property settings that are also critical in making CalcPad work. Each number key and operation key (except Clear and Clear Entry) have the Tag property set to a value used in conditional logic in the code. We'll deal with these later.

The first task in re-creating CalcPad is to open a new project in Visual Studio using the ASP.NET Web Application template. We did a trial run application in the previous lesson and this should work exactly the same way. It's a good idea to change the default name to something that will work for you later.

Ordinarily, we would add components directly to the form but in this case, we want to create a Web User Control. From the Project menu, select Add Web User Control. You might want to give your control a meaningful name at this point. A new "name.ascx" window will open for your use in building your control now. The file identifier ".ascx" means that it's a Web User Control. This new window warns you that components can't be placed in specific locations as easily since we're building a component that can be placed in other web pages. The illustration shows you what you should be seeing in Visual Studio.

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 4

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

All rights reserved.