Hi,
I'm trying to develop my first webpart. It contains a radionbuttonlist. The list is initialization in CreateChildControls.
protected override void CreateChildControls()
{
if(!Page.IsPostBack)
{
rbList = new RadioButtonList();
rbList.Items.Add("Contact");
rbList.Items.Add("Document");
rbList.Items.Add("Project");
rbList.SelectedIndexChanged +=new
evntHandler(rbList_SelectedIndexChanged);
rbList.AutoPostBack = true;
}
else
{}
}
When the user select a radionbutton, the rbList become <Undefined value>. I've tryed to set this.EnableViewState = true... but still it's even a user hits a button the rbList become <Undefined value>.
Do anybody know what I can do??
regards;
elin
I'm trying to develop my first webpart. It contains a radionbuttonlist. The list is initialization in CreateChildControls.
protected override void CreateChildControls()
{
if(!Page.IsPostBack)
{
rbList = new RadioButtonList();
rbList.Items.Add("Contact");
rbList.Items.Add("Document");
rbList.Items.Add("Project");
rbList.SelectedIndexChanged +=new
evntHandler(rbList_SelectedIndexChanged);
rbList.AutoPostBack = true;
}
else
{}
}
When the user select a radionbutton, the rbList become <Undefined value>. I've tryed to set this.EnableViewState = true... but still it's even a user hits a button the rbList become <Undefined value>.
Do anybody know what I can do??
regards;
elin