Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm new to user controls.
I have checkboxes list in usercontrols and I'm using the usercontrol in my .aspx page. If I check the value in my .aspx page and click on submit button, I need to pass the value to my usercontrol and access the data accordingly.

How to know whether the checkbox in my .aspx page is checked or not and access the data accordingly??
Posted
Comments
Sandeep Mewara 24-Mar-11 9:14am    
Shouldn't it be opposite? You have checkboxlist in usercontrol and usercontrol in a page. Submit would be on main page. On click of submit, you need to access the checkboxlist of UC. Right?
sravanirn 24-Mar-11 9:35am    
I'm able to access the checkboxlist of usercontrol in my .aspx page. My problem is if I check a value in my .aspx page, then I should pass the value to my usercontrol and find the value correspondingly and get the value back to my .aspx page and I should display the message which I got from my usercontrol.

1 solution

You can always define a property in your usercontrol and then when checkbox is checked in the page update the property which can be read inside the usercontrol.
 
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