|
When making a RadioButtonList control, when the AUTOPOSTBACK property is set to true, the selection returns to the default value.
Data binding
RadioButtonList1.DataSource = DS.Tables [0] .DefaultView;
RadioButtonList1.DataTextField = "drug name"; RadioButtonList1.DataValueField = "drug name";
RadioButtonList1.DataBind ();
When ready to output to lable5 after selection
this.Label5.Text = RadioButtonList1.SelectedItem.Value;
Display error Object reference is not set to an instance of the object. |
|