Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
what the purpose user control page in asp.net, basically how to use it.

Shubham vijay( beginner learning asp.net using c# with sql server 2005 )
Posted

try this CP article

User Control in ASp.net
 
Share this answer
 
Comments
Shubham Vijay 11-Nov-11 2:53am    
m already read but i have no clear .
User controls allow you to save a part of an existing ASP.NET page and reuse it in many other ASP.NET pages. A user control is almost identical to a normal .aspx page, with two differences: the user control has the .ascx extension rather than .aspx, and it may not have <HTML>, <Body>, or <Form> tags.
Reference Link :- OREILLy-[Custom and User Controls][^]
 
Share this answer
 
Comments
Shubham Vijay 11-Nov-11 2:54am    
can i use user control in all control tools(tool box) .
User Controls serve the purpose of reusing controls. Imagine you need a search box in several pages of your application. You can create a search user control and drop it in every page where you want it visible.

So, it's a container of UI Controls that aggregates reusable blocks for your pages.
 
Share this answer
 
Comments
Shubham Vijay 11-Nov-11 2:52am    
but search user control make in master page then also use control all page. what the purpose user control .
User control basically used when we need a set of controls and functionality in many pages.In C# you can create user control by adding a new ascx page and you can start creating your own user control by adding cotrols from tool box.For example you can create a Login Page user control by adding all the necessary contorl and validation and can use this user control where ever you need a login page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900