vishnu
vishnu

Reputation: 147

RadioButtonList.Selectedvalue returns an empty string

I define the datasource in my c# code and I have a submit button which takes the value of the radiobuttonlist

asp:RadioButtonList    ID="RadioPaidIdList" runat="server" DataValueField ="Label" DataTextField = "Label"  

First time i click submit it returns an empty value. And next time i select a radiolist and click submit it returns a proper value. Weird !!

Upvotes: 0

Views: 2222

Answers (2)

Shruti PATEL
Shruti PATEL

Reputation: 13

 RadioButtonList1.SelectedItem.Text;


 RadioButtonList1.SelectedValue;

apply any one of tow...... i hope it help you........

Upvotes: 0

Mason Blier
Mason Blier

Reputation: 140

Make sure you have a default radio button selected in your form. The code in WPF and winforms is checked="true".

Upvotes: 1

Related Questions