I have a modal popup I am using to get some data from the user and save back to a table. I have them pick a customer and then create checkboxes for each shipto associated with that customer. I want the user to be able the select from the shiptos and then I want to save the choices to the database. I get the list of customers and create the checkboxes but I can't for the life of me get the dang things to check. You click it and nothing happens. What am I doing wrong?? :-(
My code is as follows:
HTML:
<ajaxToolkit:ModalPopupExtender
ID="mpeEdit"
runat="server"
PopupControlID="pnlPopup"
TargetControlID="pnlPopup"
CancelControlID="btnDlgCancel"
BackgroundCssClass ="modalBackground"
OnCancelScript="HidePopup ('ctl00_Content_mpeEdit')" />
<asp:Panel ID="pnlPopup" runat="server" CssClass="innerPopup"
style="display: none;
width:600px;
postion: absolute;
left: 25%;
top: 10%;">
<asp:UpdatePanel runat="server" ID="chkUpdate">
<ContentTemplate>
<p class="bodyStyle" >
<asp:HiddenField ID="hidEditID" runat="server" /><br />
<span class="subHeaderStyle">Edit User</span>
<br />
<br />
<asp:Label ID="Label15" cssclass="bodyStyle" runat="server" width="75px" style="width:75px"><b>Customer</b></asp:Label>
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server"
Width="10px"
ControlToValidate="ddCustomer"
ErrorMessage="* Customer"
ValidationGroup="modalEdit"
cssclass="bodyAlertStyle">*</asp:RequiredFieldValidator>
<asp:DropDownList cssclass="bodyStyle" width="400px" style="width:400px; text-align:left" ID="ddCustomer" AutoPostBack="true" runat="server" />
</p>
<table>
<tr>
<td valign="top"><asp:Label ID="Label16" cssclass="bodyStyle" runat="server" width="92px" style="width:92px"><b>Ship Tos</b></asp:Label></td>
<td valign="top">
<asp:Repeater ID="rptChklstShipTo" runat="server">
<ItemTemplate>
<asp:CheckBox ID="chkShipTo" AutoPostBack="true" runat="server" />
<asp:Label runat="server" CssClass="bodyStyle"><%# DataBinder.Eval(Container.DataItem,"ACCOUNTNUM")%></asp:Label>
<br />
</ItemTemplate>
</asp:Repeater>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<p align="center" class="bodyStyle">
<asp:Button Height="20px" CssClass="cssButtonGreen" Text="Update" ValidationGroup="modalEdit" CausesValidation="true" id="btnDlgOK" runat="server"/>
<asp:Button Height="20px" CssClass="cssButtonGreen" Text="Cancel" id="btnDlgCancel" runat="server"/>
</p>
</asp:Panel>
Server Side code to create checkboxes:
Private Sub FillRepeaterWithShipTos(ByVal rpt As Repeater, ByVal sCustomer As String)
rpt.DataSource = Nothing
Dim dtShipToList As DataTable = wcf_CustomerPortal.GetShipToList (sCustomer, "000")
If Not dtShipToList Is Nothing AndAlso dtShipToList.Rows.Count > 0 Then
rpt.DataSource = dtShipToList
rpt.DataBind()
End If
End Sub