exoticpop.
New Member
I have a CheckboxList within a DIV. The DIV appears as a modal popup when a button is clicked. Then the user checks off any number of items in the checkboxlist and clicks OK. This hides the div.once the user clicks the save button on the main form, I need to pass parameters to a stored procedure based on which items in the checkboxlist were clicked, but they are always set to unchecked when I run the save code. I'd love some thoughts on how to do this properly.ThanksJQuery:\[code\] $(document).ready(function () { $('#<%=txtLANG.ClientID %>').click(function () { $("#overlay-back").dialog({ resizable: false, modal: true, width: 500, height: 400, buttons: { OK: function () { GetLanguages(); $(this).dialog("close"); }, Cancel: function () { $(this).dialog("close"); } } }); }); });\[/code\]Save Method in CodeBehind\[code\] private void Save() { List<string> lstItemsChecked = new List<string>(); for (int i = 0; i < chkTopLanguages.Items.Count; i++) { if(chkTopLanguages.Items.Selected) lstItemsChecked.Add(chkTopLanguages.Items.Value); } //stored proc call } protected void btnSubmit_Click(object sender, EventArgs e) { Save(); }\[/code\]ASPX Code for DIV popup and CheckBoxList\[code\] <div id="overlay-back" style="display:none;"> <td rowspan="3" valign="top"> <asp:CheckBoxList ID="chkTopLanguages" TextAlign="Right" runat="server" /> <br /> <asp:TextBox runat="server" ID="txtOtherLanguages" Text="Other Languages..."></asp:TextBox> </td> </div>\[/code\]