.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 27th, 2005, 06:03 AM
ceema ceema is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 2 ceema User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 48 m 43 sec
Reputation Power: 0
Retrieve label and checkbox values from datalist

Dear all,

I have one datalist with one checkbox(to display MemberName) and one label(to retrieve MemberID). What I want is when I am selecting multiple checkboxes and pressing the button(get items), I have to display the corresponding MemberIDs 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

Meera

Code:
<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, "MemberName") %>'></asp:CheckBox>
   <asp:Label ID="LabMemberID" Text='<%# DataBinder.Eval(Container.DataItem, "MemberID") %>' 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>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Retrieve label and checkbox values from datalist


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT