InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


Retrieve value from datalist Expand / Collapse
Author
Message
Posted 26/08/2005 15:37:11
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 30/11/2005 12:10:31
Posts: 1, Visits: 7
Dear all,

   I have one datalist with one checkbox(to display categoryname) and one label(to retrieve categoryid). What I want is when I am selecting multiple checkboxes and pressing the button(get items), I have to display the corresponding categoryids of the checked checkboxes. In this code I am calling a function in onclick of button. In that subroutine I have to write a code for this. Please help me to find a solution for this, I am in a project which needs a solution for this.

Thanks

Ceema

<FORM id="Form1" runat="server">
  <asp:datalist id="MyDataList" runat="server" Width="100%" Font-Size="10" GridLines="None" RepeatColumns="2"
   Headerstyle-HorizontalAlign="Center" Headerstyle-Font-Size="14" Headerstyle-Font-Bold="True"
   Headerstyle-Font-Name="Arial" Headerstyle-BackColor="#E0E0E0" Font-Name="Arial" cellspacing="2"
   cellpadding="2">
   <ItemTemplate>
    
    <ItemTemplate>
   <asp:CheckBox ID="CBN1" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName") %>'></asp:CheckBox>
   <asp:Label ID="lblCategoryID" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryID") %>' Visible="False"></asp:Label>
   <br>
</ItemTemplate>
    
    <br>
   </ItemTemplate>
  </asp:datalist>
  <asp:Label ID="label1" runat="server" />
  <asp:Button id="button1" Text="Get Items" onclick="Item_Change" runat="server" /></FORM>
</HTML>

Post #8238
« Prev Topic | Next Topic »

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 11:37pm

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.031. 9 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.