Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
I m using a radiobuttonlist with two listitem.I am binding the radiobuttonlist on page_load under !IsPostBack event with there default values.On the problem is..even if i change there values to save it in the database on click of a button i am getting the default selected item and not the changed item.Please help me!!
Posted
Comments
Technoses 1-Jun-12 22:43pm    
write your code here to trace problem

Hi,

There can be several reasons for this. May the way you are picking the value from the radio button list is wrong. It should be like the radionbuttonlistid.selectedvalue . It will be better, if you can share the code. How you are binding the list. Is it dynamically or hardcoded.

Happpy Coding
:)
 
Share this answer
 
Comments
Ranjith Reddy CSE 2-Jun-12 1:23am    
radiobuttonlist.SelectedItem.Text;

Try this ? ?
Member 8459400 2-Jun-12 1:32am    
i am getting the value from the gridview and assigning it to the radiobutton's like this..
if(lbltext.text == "Yes")
{
radiobtn.items.findbyvalue("listitem1").selected = true;
}
else
{
radiobtn.items.findbyvalue("listitem1").selected = false;
}
Linto Leo Tom 2-Jun-12 1:46am    
Check whether the enabledautpostback is true
Member 8459400 2-Jun-12 2:42am    
if i keep the autopostback as true..each time i click on the radiobutton the page gets loads and the default radiobutton is selected
VB
radiobuttonlist.SelectedItem.Text;

Try this ? ?
 
Share this answer
 
Comments
Member 8459400 2-Jun-12 1:34am    
the value i am getting from radiobutton is the default value i have assigned on page load and not the one that i have selected from the page

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900