|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
u'd better post it in the asp.net forum instead of this one :P
soz cant help ya with .net tho |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > checkbox in aspx |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|