O'Reilly logo

ASP.NET for Web Designers by Peter Ladka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

User Control Creation Techniques

User controls can be created in a method similar to the way you create your typical ASP.NET web form pages. The primary difference between ASP.NET web form pages and User controls is that User controls do not include <html><body> and <form runat="server"> tags within them. These tags would already be included in your ASP.NET web form page.

ASP.NET pages can contain only one <form runat="server"> tag per page. You can include as many standard <form> tags as you’d like, but there can be only one “web form” per ASP.NET page.

Creating User Controls

Let’s start out with a simple example of a form box that asks what the password is and go from there. The following are the User control pages. Notice that a User control ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required