G
Guest
What I'm trying to do seems pretty straightforward so I must be missing
something simple. Any help is greatly appreciated.
On my page I have a DropDownList, a HtmlTable and a Button. Each row in the
HtmlTable consists of 5 cells individually populated with a single checkbox.
The DropDownList value dictates what populates the HtmlTable. On the
SelectedIndexChanged event of the DropDownList I populate the HtmlTable based
on the DropDownList value passed to a Stored Procedure. When the Button is
clicked I would like to capture the values of each CheckBox in each of the
HtmlTables rows.
If I place the function call to populate the HtmlTable outside of my
(!IsPostBack) check everything works perfectly as long as I don't fire the
DropDownList SelectedIndexChanged event. If I fire the SelectedIndexChanged
event, I receive an error stating that "Multiple controls with the same ID
'XXXX' were found."
If I place the function call to populate the HtmlTable inside of my
(!IsPostBack) check, the SelectedIndexChanged event fires off beautifully.
Everything works fine. The HtmlTable is populated with the correct rows
reflecting the results from the Stored Procedure. The problem is that when I
click the Button to capture the values, I'm unable to access the checkbox
values. The rows to my HtmlTable (and the checkboxes) don't exist.
I assume that since I'm close to my desired results with both approaches
that it has to be something simple that I'm overlooking. Thanks for your
help.
something simple. Any help is greatly appreciated.
On my page I have a DropDownList, a HtmlTable and a Button. Each row in the
HtmlTable consists of 5 cells individually populated with a single checkbox.
The DropDownList value dictates what populates the HtmlTable. On the
SelectedIndexChanged event of the DropDownList I populate the HtmlTable based
on the DropDownList value passed to a Stored Procedure. When the Button is
clicked I would like to capture the values of each CheckBox in each of the
HtmlTables rows.
If I place the function call to populate the HtmlTable outside of my
(!IsPostBack) check everything works perfectly as long as I don't fire the
DropDownList SelectedIndexChanged event. If I fire the SelectedIndexChanged
event, I receive an error stating that "Multiple controls with the same ID
'XXXX' were found."
If I place the function call to populate the HtmlTable inside of my
(!IsPostBack) check, the SelectedIndexChanged event fires off beautifully.
Everything works fine. The HtmlTable is populated with the correct rows
reflecting the results from the Stored Procedure. The problem is that when I
click the Button to capture the values, I'm unable to access the checkbox
values. The rows to my HtmlTable (and the checkboxes) don't exist.
I assume that since I'm close to my desired results with both approaches
that it has to be something simple that I'm overlooking. Thanks for your
help.