Jul 27, 2008

Asp Dynamic Checkbox In A Table

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > .NET ( ASP.net VB.net )

free web hosting

Asp Dynamic Checkbox In A Table

kvarnerexpress
I'd like to add a checkbox for each row so that the user can move to process the checked items to the next page.
I want the checkbox to take the value of the primary key from the database
so assuming that
blabla=rs.fields("code") where the code is the primary key
how can I add a dynamic checkbox to this table for each row


CODE
<table border="1" align="center">
<tr>
<% for each field in rs.fields %>
<td><center> <% response.write("" & field.name & "") %> </center>
</td> <%next %></tr>
<%do until rs.eof
for each field in rs.fields%>
<td><center> <% response.write( "" & field.value & "") %> &nbsp

</center></td>
<%next%> </tr>
<%rs.movenext
loop%>
</table>
<%rs.close
conn.close
set rs=nothing %>
</table>

 

 

 


Reply

Tyssen
CODE
<td><input type="checkbox" name="?" value="<% =(rs.fields("primaryKey")) %>"></td>

If you want the checkbox to be selected based on a certain parameter, it'd be:

CODE
<td><input type="checkbox" name="?" value="<% =(rs.fields("primaryKey")) %>" <% if (rs.fields("primaryKey") = something then response.write "checked" end if %>></td>

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. check box value in asp - 12.35 hr back. (1)
  2. checkbox in table asp - 17.26 hr back. (1)
  3. checkbox in table - 18.95 hr back. (1)
  4. add checkbox dynamically java - 22.44 hr back. (1)
  5. asp dynamic checkbox - 33.75 hr back. (1)
  6. how to get an primary key dynamically to all tables in sp - 34.65 hr back. (1)
  7. checkbox inside table - 35.12 hr back. (1)
  8. create checkbox dynamically in a table using asp - 36.60 hr back. (1)
  9. javascript dynemic checkbox array - 37.12 hr back. (1)
  10. asp checkbox database - 38.14 hr back. (1)
  11. table checkbox select - 40.11 hr back. (1)
  12. build a dynamic html table in vb.net - 51.95 hr back. (1)
  13. how to get dynamic checkbox in asp - 53.85 hr back. (1)
  14. checkboxes in asp table - 53.97 hr back. (1)
Similar Topics

Keywords : asp dynamic checkbox


    Looking for asp, dynamic, checkbox, table

Searching Video's for asp, dynamic, checkbox, table
advertisement



Asp Dynamic Checkbox In A Table



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE