Export (0) Print
Expand All
1 out of 4 rated this helpful - Rate this topic

How to: Include ASP.NET User Controls in Web Pages (Visual Studio) 

Adding an ASP.NET user control to a Web page is similar to adding other server controls to the page. However, you must be sure to follow the procedure below so that all of the necessary elements are added to the page.

For information about how to create a custom user control, see How to: Create ASP.NET User Controls (Visual Studio).

To add an ASP.NET user control to a Web page

  1. In Visual Web Developer, open the Web page to which you want to add the ASP.NET user control.

  2. Switch to Design view.

  3. Select your custom user control file in Solution Explorer, and drag it onto the page.

    The ASP.NET user control is added to the page. In addition, the designer creates the @ Register directive, which is required for the page to recognize the user control. You can now work with the control's public properties and methods.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.