Click here to Skip to main content
15,919,178 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created web user control and assign it to a page. I want to access web user control elements such as textbox, checkbox and other server control on a aspx page. How could i approach to access ?

Thanks,
Mangesh :-)
Posted

Easiest and robust way would be to expose the controls in user control as public properties using get-set. This way, directly using usercontrol object, you can access those controls and use them.
 
Share this answer
 
Comments
Member 8090436 21-Jul-12 1:49am    
Thanks,
Excellent solution link provided!
you have to add that control by below method

<%@ Register Src="WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc1" %>
 
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