Click here to Skip to main content
15,907,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I created run time radiobuttons. I need to check the radiobutton if they are checked or not. How is it possible?
Somebody help me please.

Thanks in advance
Posted
Updated 25-Nov-10 23:34pm
v2
Comments
JF2015 26-Nov-10 5:33am    
Edited to fix spelling.

Try this,
CheckBox chk = new CheckBox();
chk = (CheckBox)this.FindControl("ur checkbox id");
 
Share this answer
 
Comments
Dalek Dave 26-Nov-10 5:37am    
Good Call.
tulasiram3975 26-Nov-10 5:42am    
But I had more then 10 id's
Toniyo Jackson 26-Nov-10 5:48am    
Each id u need to check seperately.
thatraja 26-Nov-10 6:02am    
Is your radio buttons are dynamically generated?
tulasiram3975 26-Nov-10 6:03am    
RadioButton rb = (RadioButton)PlaceHolder1.FindControl(Request.Form["attrad"+i]);
i tried in this way but getting null reference exception sir
(Chkbxdisplay.Checked ? true : false);


chkbxdiplay is the name of the checkbox it gives the bool value i.e. true or false then u can store this value in any object as u required..
try this can help u.:thumbsup:
 
Share this answer
 
v2
Comments
tulasiram3975 26-Nov-10 6:12am    
sir actually i generated radio buttons dynamically
i had more then 10 id's and i need to know each id is checked or not
Toniyo Jackson 26-Nov-10 6:13am    
Did u read the question? Its dynamically created radiobutton.

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