Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 4 checkboxes in an update panel but when I want to use them in a code behind it shows that control is not declared, any help appreciated.
Many thanks.
Posted
Updated 17-Aug-11 1:15am
v2

The control is a child of the panel, not the form. Use something like this:

C#
updatePanel1.checkBox1.Checked = true;
 
Share this answer
 
Comments
Rakesh S S 17-Aug-11 13:10pm    
this doesnt work i tried.....any other soln appreciated.
access your control by this means checkBox1.Checked
 
Share this answer
 
1]check in designer it has runat="server" property is assigned or not.
2]check in the designer .cs file find the control by it's name as checkbox1 it has to be there.
3]check is the page is successfully inherited from System.Web.UI.Page or not.
4]check is your control is asp.net control or not.
 
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