views:

32

answers:

1

can i get a value of a selected radio button in LoadViewState event of the the WebControl and how? All the components are generated in codebehind, so i have those controls:

RadioButtonList rbl;
ListItem liOne;
ListItem liTwo;

at the moment i am stuck at that the overriden LoadViewState is not being invoked

protected override void LoadViewState(object o)
{
  action = rbl.SelectedValue;
  action2 = rbl.SelectedItem.Value;
  base.LoadViewState(o);
}
+1  A: 

You also need to override the SaveViewState method. Radio buttons AFAIK have problems saving their selected state.

http://www.4guysfromrolla.com/articles/110205-1.aspxlink text

IrishChieftain