|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
UserControl with databound repeater drops values on postbackI have a user control that contains a repeater that generates a list of check boxes. The checkboxes render fine, but they don't maintain their checked state on postback. I've tried using Page_Load, Page_Init, OnInit, enabling and disabling viewstate without success. Any help would be appreciated. Thanks, Paul ASCX: <asp:Repeater ID="countryList" runat="server"> <HeaderTemplate> <table cellpadding="2" cellspacing="0"> </HeaderTemplate> <ItemTemplate> <tr> <td><asp:CheckBox ID="countryID" Value='<%# Eval("CountryID") %>' runat="server" /></td> <td><asp:Label AssociatedControlID="countryID" runat="server"><%# Eval("Name") %></asp:Label></td> <td><img src="<%# string.Format("/images/flags/{0}.gif", Eval("CountryID")) %>" height="13" width="24" /></td> </tr> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater> ASCX.CS: protected void Page_Init(object sender, EventArgs e) { // get countries countryList.DataSource = Country.GetCountries(); DataBind(); }
Really Stuck on a Canlendar Control PLEASE HELP!!!
Javascript disabled Menu control Accessibility Events for programatically added controls UserControl values lost on PostBack I am trying to hide some textboxes, dropdownlists and labels in datalist Video Player in browser... how do I do? CustomWeb Controls and Events I want to know what is a Functional Specification Document? Clikable rows in Grid View treview asp.net 2.0 issue |
|||||||||||||||||||||||