Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

if we want to get textbox value means we can write like this : textboxobject.text=textbox1.text

like this if we want to get radio button selected value means how can i write i tried this: radiobottonobject.Text=radiobutton.selectedvalue; but not working. what i want to do
Posted
Comments
Suvabrata Roy 22-Sep-15 8:19am    
what you required? whether that radio button is checked or not ?
Maciej Los 22-Sep-15 15:38pm    
What framework? Specify full name of radiobutton class.

SelectedValue is not a RadioButton property: try Checked instead.
 
Share this answer
 
 
Share this answer
 
v2
the value of a radio button is either checked or not checked
 
Share this answer
 
You can try this Line

C#
var value = $("#form1 input[type='radio']:checked").val();
       alert(value);

Hope this helps you..
Thanks
 
Share this answer
 
SelectedValue is not a property of RadioButton. I think you might been trying to do like-

if(radioButton1.Checked)
radioButtonObject.Text=radioButton1.Text;

the above snippet will help you to get checked radiobutton text value.

hope this help you.
thankq..:)
 
Share this answer
 
v2

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