|
 |
asp_web_howto thread: CheckBox
Message #1 by mjija1@l... on Wed, 21 Feb 2001 16:26:17 GMT
|
|
Hi,
I am a budding ASP programmer, and I am stuck with this problem with CheckBoxes..
In a form, I am having a collection of check boxes with the same name and different values and when checked, it has to be submitted
to the next page and I have to store in SQL server.
Can some body guide me on this..
Many thanks,
Madhu
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 21 Feb 2001 16:53:16 -0000
|
|
In the HTML Form:
<INPUT TYPE="checkbox" NAME="checkgroup" VALUE="A">
<INPUT TYPE="checkbox" NAME="checkgroup" VALUE="B">
<INPUT TYPE="checkbox" NAME="checkgroup" VALUE="C">
<INPUT TYPE="checkbox" NAME="checkgroup" VALUE="D">
Then in the ASP to which the form is submitted:
dim checkgroup
checkgroup = request.form("checkgroup")
if checkgroup="" then
'No boxes were checked
elseif isArray(checkgroup) then
'more than one box was checked
else
'one box was checked
end if
-----Original Message-----
From: mjija1@l... [mailto:mjija1@l...]
Sent: Thursday, February 22, 2001 1:00 AM
To: ASP Web HowTo
Subject: [asp_web_howto] CheckBox
Hi,
I am a budding ASP programmer, and I am stuck with this problem with
CheckBoxes..
In a form, I am having a collection of check boxes with the same name and
different values and when checked, it has to be submitted to the next page
and I have to store in SQL server.
Can some body guide me on this..
Many thanks,
Madhu
Message #3 by "Paula Durán Trejos" <paudurtr@h...> on Wed, 21 Feb 2001 14:20:28 -0600
|
|
When you submit the page you get the value of checkbox like that
chkOptions = 1,2,4,5 the collection of values which were checked. In this
case, the value was a number, but it could be a word Paula, Anthony, Allan.
You get all the values checked in a string, so you have to read all the
string and get value for value
>From: mjija1@l...
>Reply-To: "ASP Web HowTo" <asp_web_howto@p...>
>To: "ASP Web HowTo" <asp_web_howto@p...>
>Subject: [asp_web_howto] CheckBox
>Date: Wed, 21 Feb 2001 17:00:05 -0800
>
>Hi,
>I am a budding ASP programmer, and I am stuck with this problem with
>CheckBoxes..
>In a form, I am having a collection of check boxes with the same name and
>different values and when checked, it has to be submitted to the next page
>and I have to store in SQL server.
>Can some body guide me on this..
>Many thanks,
>Madhu
>
>
>$subst('Email.Unsub')
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
|
|
 |