By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,212 Members | 2,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,212 IT Pros & Developers. It's quick & easy.

How to do use checkbox in a response.write that pulls all data

P: n/a
Hi,
I have a asp page. This page pulls all data from a query. Part of the code
is as follows:
<%
Response.Write "<table border='1' width='80%' height='1' cellspacing='1' >"
Response.Write
"<th>Key</th><th>SubgrantID</th><th>Title</th><th>Unlock</th><th>Unverify"
%>
<%
do until sRS.eof
Key = sRS("SubgrantIntId")
Subgrant = sRS("ComboID")
Title = sRS("Title")
Unlock = sRS("IsChecked")
Unverify = sRS("IsVerified")
%>

<tr>
<td align="center">
<div style="cursor:hand"><p align="left"
OnClick="location.href='mainreportagain1.asp?Grant ID=<%Response.Write Key%>'">

<u><font color="#0000FF">
<%Response.Write Key%></font></u></div></td>
<% 'this writes out the key%>
</td>

<td align='center'>
<font color="#000000">
<%Response.Write Subgrant%>

<td align='left'>
<font color="#000000">
<%Response.Write Title%>
</td>
<td align='left'>
<font color="#000000">
<%Response.Write Unlock%>
</td>
<td align='left'>
<font color="#000000">
<%Response.Write Unverify%>
</td>

</tr>

In the above code, in the statements response.write Unlock and
response.write unverify I would like to bring checkboxes. The back end data
for these two fields in the database are actually checkboxes. I would
appreciate any help to handle the situation where the rows should show
checkbox values for the two fields mentioned above. Thanks.
Jan 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<td align='left'>
<font color="#000000">
<input type="checkbox" id="chkUnlock" name="chkUnlock"
value="<%=Unlock%>">
<label for="chkUnlock"><%=Unlock%></label>
</td>

That would give you a checkbox with a value of your Unlock variable. The
text displayed next to it would also display that value. Instead of using
"Response.Write" I used the shorthand "=".

Ray at work

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
Hi,
I have a asp page. This page pulls all data from a query. Part of the code
is as follows:

<td align='left'>
<font color="#000000">
<%Response.Write Unlock%>
</td>
<td align='left'>
<font color="#000000">
<%Response.Write Unverify%>
</td>

</tr>

In the above code, in the statements response.write Unlock and
response.write unverify I would like to bring checkboxes. The back end
data
for these two fields in the database are actually checkboxes. I would
appreciate any help to handle the situation where the rows should show
checkbox values for the two fields mentioned above. Thanks.

Jan 24 '06 #2

P: n/a
Thanks for your help Ray. I appreciate it. Regards.

"Ray Costanzo [MVP]" wrote:
<td align='left'>
<font color="#000000">
<input type="checkbox" id="chkUnlock" name="chkUnlock"
value="<%=Unlock%>">
<label for="chkUnlock"><%=Unlock%></label>
</td>

That would give you a checkbox with a value of your Unlock variable. The
text displayed next to it would also display that value. Instead of using
"Response.Write" I used the shorthand "=".

Ray at work

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
Hi,
I have a asp page. This page pulls all data from a query. Part of the code
is as follows:

<td align='left'>
<font color="#000000">
<%Response.Write Unlock%>
</td>
<td align='left'>
<font color="#000000">
<%Response.Write Unverify%>
</td>

</tr>

In the above code, in the statements response.write Unlock and
response.write unverify I would like to bring checkboxes. The back end
data
for these two fields in the database are actually checkboxes. I would
appreciate any help to handle the situation where the rows should show
checkbox values for the two fields mentioned above. Thanks.


Jan 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.