473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Simple CheckBox Question

I am pretty new to ASP.

HTML Page
<input type="checkbox" name="chkStat" value="" checked>Low

ASP Page
chkCheck = request.form("chkStat")
response.write chkCheck

I get nothing? How do I pass the value of the checkbox from the HTML page
to ASP page.

Thank you

Jul 22 '05 #1
3 1624
you haven't given it a value. well, you have. an empty string.

if you actually give it a value, it'll pass that.

<input type="checkbox" name="chkStat" value="This Is A Value" checked>
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no rights.
"MarkVan" <dt*******@yahoo.com> wrote in message
news:OY*************@TK2MSFTNGP10.phx.gbl...
I am pretty new to ASP.

HTML Page
<input type="checkbox" name="chkStat" value="" checked>Low

ASP Page
chkCheck = request.form("chkStat")
response.write chkCheck

I get nothing? How do I pass the value of the checkbox from the HTML page
to ASP page.

Thank you


Jul 22 '05 #2

"MarkVan" <dt*******@yahoo.com> wrote in message
news:OY*************@TK2MSFTNGP10.phx.gbl...
I am pretty new to ASP.

HTML Page
<input type="checkbox" name="chkStat" value="" checked>Low

ASP Page
chkCheck = request.form("chkStat")
response.write chkCheck

I get nothing? How do I pass the value of the checkbox from the HTML page
to ASP page.


Actually you're getting an empty string, which is the "value" you assigned
to the "chkStat" checkbox.
make this change:
<input type="checkbox" name="chkStat" value="Low" checked>Low
_____________________________________^ (new value)

Jul 22 '05 #3
<<
I get nothing? How do I pass the value of the checkbox from the HTML
page to ASP page.


Generally speaking you can pass variables from page to page by:

1) Posting form fields from one page to the next (or to the same page)
and on the page to retrieve the value strLName = Request.Form("LName")

2) Using a querystring such as Response.Redirect
"login.asp?lname=smith&fname=tom" and on the page to retrieve the values
strLName = Request.QueryString("lname") and strFName =
Request.QueryString("fname")

3) Using session variables such as Session("LName") = "Smith" and on the
page to retrieve the value strLName = Session("LName")

4) Using cookie variables such as Cookie("LName") = "Smith" and on the
page to retrieve the value strLName = Cookie("LName")

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
2
by: Zhang Weiwu | last post by:
Hello. Very simple question. Here is my HTMl and I wish each <input type="text"> To position that they look like aligned to right, while the other part (the checkbox and its label) look like...
10
by: Jennyfer J Barco | last post by:
Hello, I have a datagrid that brings some information from a query. I need to have a checkbox in each row so the user can select the rows he wants to reprint. Is it possible to have a checkbox...
2
by: Allain Bøge | last post by:
It is really a simple question. Visual Basic .NET (2003) I create 2 forms (Form1 and Form2) I create a checkbox in Form1 (checkbox1) I create a checkbox in Form2 (checkbox1) I go to Form1...
5
by: W.Sh | last post by:
Hello Everyone! I'm having some issues with javascript that I can't seem to resolve... Basically, I have a very simple code that's supposed to change the innerHTML of a span element whenever I...
34
by: clinttoris | last post by:
Hello Experts, I have been told to post this in the Javascript forum as I want to do this client side just before my form gets submitted. Once the user clicks the submit button a javascript...
2
by: SoulScriber | last post by:
This comes to be an IE vs. Firefox issue. What I'm trying to do is 'onchange' of a checkbox have a table display underneath. Firefox works fine (when you click on the 'Check Here if your...
1
by: rjoseph | last post by:
HI Guys I have a simple check box form (using GET as the method) with a list of 10 different UK counties. I have validated the form so that users have to select no more and no less than 5 UK...
4
by: ameshkin | last post by:
I have a checkbox with an ID of svc_tp_1, and an image that corresponds with this checkbox below it. <input type="checkbox" name="checkbox" id="svc_tp_1" value="svc_tp_1" / <img...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.