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 ...

Get ASP.NET for Web Designers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.