.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 October 9th, 2003, 05:31 AM
msrnivas msrnivas is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 30 msrnivas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
checkbox in aspx

hi

hi

i am doing my web page in asp.net
i have problem with check box.here i am explaining detailly

i have 2 arrays both contains some names.second array is subset of fisrt one.
explamle first array contains 100 names and second one contains 20 names.
i want to show the names of first array with check box option.if names of first array exist in second array
i want to show check box with checked option.other wise checkbox will be unchecked.i did it in asp (like below example)
and working fine.


flag=false
for i=0 to firstarr.count-1
for j=0 to secondarr.count-1
if trim(firstarr.item(i))=trim( secondarr.item(j)) then
flag=true
exit for
end if
next
if flag=true then
<td><input type=CheckBox ID="firstarr<%=i%>" checked value="1"><%=firstarr.item(i)%></td>

else
<td><input type=CheckBox ID="firstarr<%=i%>" value="0"><%=firstarr.item(i)%></td>
end if
flag=false
next





but aspx its giving problem.because in asp:checkbox is not allowing duplicate id and also not allowing dynamically assaiging

id dynamically like

<%if flag=true then%>

<td><asp:CheckBox Runat =server ID="firstarr<%=i%>" checked /><%=firstarr.item(i)%></td>
<%else%>

<td><asp:CheckBox runat=server ID="firstarr<%=i%>" /><%=firstarr.item(i)%></td>

<%end if%>


i need the id because later i want to do updates in the database based on this ids.

i hope i cleared the problem.pl advice me
thanks sr

Reply With Quote
  #2  
Old October 9th, 2003, 08:06 AM
Relax Relax is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 43 Relax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
u'd better post it in the asp.net forum instead of this one :P

soz cant help ya with .net tho

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > checkbox in aspx


Developer Shed Advertisers and Affiliates


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap