G
Guest
I have the following problem (especially with the groupname-attribut of the
RadioButton-Control) when developing in Visual Studio 2005 Beta.
I load an ascx-control in an aspx-page. This ascx-control itself creates
dynamically many radiobuttons in this way:
foreach (DataRow radiobutton_item in rbl_values.Rows)
{
RadioButton single_radiobutton = new RadioButton();
single_radiobutton.ID = "idname";
single_radiobutton.GroupName = "groupname";
this.Page.Controls.Add(single_radiobutton);
}
When loading the aspx-Page (and its controls) everything is fine and
groupname works as it should (I could only select one of the group). But when
a postback to this site occurs it seems that the listener of the
submit_button (placed on the aspx-Page) is killed. When I do not define the
Groupname of the RadioButton the submit_button works as it should (listeners
are not killed?!) but I can select more than only one radiobutton as I don't
have a group which they belong to.
I tried it already with an alternative:
single_radiobutton.Attributes.Add("name", mygroupname) instead of
single_radiobutton.GroupName = "groupname"; (seen in
http://msdn.microsoft.com/newsgroup...79eba1-694a-431a-8ae4-a458895a37ec&sloc=en-us)
but this didn't help.
Do you knwo this issue?
RadioButton-Control) when developing in Visual Studio 2005 Beta.
I load an ascx-control in an aspx-page. This ascx-control itself creates
dynamically many radiobuttons in this way:
foreach (DataRow radiobutton_item in rbl_values.Rows)
{
RadioButton single_radiobutton = new RadioButton();
single_radiobutton.ID = "idname";
single_radiobutton.GroupName = "groupname";
this.Page.Controls.Add(single_radiobutton);
}
When loading the aspx-Page (and its controls) everything is fine and
groupname works as it should (I could only select one of the group). But when
a postback to this site occurs it seems that the listener of the
submit_button (placed on the aspx-Page) is killed. When I do not define the
Groupname of the RadioButton the submit_button works as it should (listeners
are not killed?!) but I can select more than only one radiobutton as I don't
have a group which they belong to.
I tried it already with an alternative:
single_radiobutton.Attributes.Add("name", mygroupname) instead of
single_radiobutton.GroupName = "groupname"; (seen in
http://msdn.microsoft.com/newsgroup...79eba1-694a-431a-8ae4-a458895a37ec&sloc=en-us)
but this didn't help.
Do you knwo this issue?