Developing User Controls

You have seen that ASP.NET provides a rich set of controls, including HTML, Web Server, and Validation controls. The fact that ASP.NET provides this list of controls and that these controls are prefixed with the “asp:” qualifier suggests that a capability should exist for users to define their own set of user controls. If you are thinking along these lines, you are absolutely right. ASP.NET does provide capability for users to define custom user controls. Take a look at how.

If you think about the Validated Email control that we defined earlier, a control like this would be a good candidate to be reused across many pages. You can do just that by creating another ASP.NET page, called Email.ascx, and including the text ...

Get Microsoft® .NET Kick Start 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.