Tuesday, 17 June 2014

Web User Control in asp.net with c#



Web User Control

A Web User Control, is a Web Form. You can say it as a web form, which can be placed on multiple web form and can be reused.
 Web User control or the .ascx file in asp .net

Difference between Web Form and Web User Control
User Control are used within Web Form and do not contain the following HTML Tags.
           <Head> Tag
           <Body> Tag
           <Form> Tag

An .ASCX file cannot be viewed directly in the browser. It will need to be placed within a container (such as another Web form) to be viewed.

So, let's add a new Web form to the project, open it, and drag the User Control file onto the page. The User Control display as follows:

No comments:

Post a Comment