|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
CheckBox in repeaterHi there
I have a little problem. I am using a repeater to list a number of items from a soap service. For each item it should be possible to check a checkbox. My problem is, how can i get the state of each checkbox ? When the user clicks my next button ? Everything is in a multiple step wizard. The same problem goes for a repeater with a radiobutton inside. Best regards Søren Reinke www.Xray-mag.com Hello Søren,
You can either 1) add an handler for the CheckedChanged event of each checkbox which mean that upon postback that event would fire up as many times there are checkboxes checked as I did in this demo (albeit with a RadioButton) http://www.societopia.net/Samples/Repeater_Hierarchy.aspx 2) loop though the Items collection of the DataList upon PostBack, find the chekcbox control within the Item using the FindControl method then check its state and decide further action. Show quoteHide quote "Søren Reinke" wrote: > Hi there > > I have a little problem. > > I am using a repeater to list a number of items from a soap service. > For each item it should be possible to check a checkbox. > > My problem is, how can i get the state of each checkbox ? When the user > clicks my next button ? > > Everything is in a multiple step wizard. > > The same problem goes for a repeater with a radiobutton inside. > > Best regards > Søren Reinke > www.Xray-mag.com > > >
Child control designers
Making ASP.NET 2.0 asp:Wizard control fully Navigatable without mo VS2005 ASP.NET Gridview cells Defining a ControlParameter of type DateTime for a DataSource InsertItemTemplate dependant dropdown list problem Disable Validator through Client-Site code Dynamic Control Positioning Custom Controls with UI Designer Newb...Treeview in asp System.Web.UI.Design namespace not found |
|||||||||||||||||||||||