Results 1 to 3 of 3

Thread: ASP

  1. #1
    Join Date
    Dec 1969

    Default ASP

    hi ,an someone tell me<BR>asp code to make sure whether a given check box is checked or not<BR><BR>like <BR><BR>&#060;input type="checkbox" name=type&#062;<BR><BR>what is asp code to know whether checkboc is checked or not

  2. #2
    KPW Guest

    Default RE: ASP

    When you use checkboxes, the name/value pair is only passed to your form handler if the checkbox was checked. So, for any checkbox, all you have to do is check to see if the name/value pair was passed to the handler.<BR><BR>Assume that you have<BR><BR>&#060;input type="checkbox" name="chkPepperoni" value="yes"&#062;<BR><BR>In your form handler, you should be able to do something like<BR><BR>&#060;%<BR>...<BR>If Request.Form("chkPepperoni") then<BR>...<BR>%&#062;<BR><BR>Alternatively, you might try<BR><BR>&#060;%<BR>...<BR>If Request.Form("chkPepperoni") = "yes" then<BR>...<BR>%&#062;

  3. #3
    Join Date
    Dec 1969

    Default RE: ASP

    first you need to give the checkbox a vlue<BR>&#060;input type="checkbox" name=type value="True"&#062;<BR><BR>The on the response page<BR><BR>If Len(Request.form("type"))&#062; 0 Then<BR>do something<BR>End If<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts