ASP session errors ...

They have: 54 posts

Joined: Oct 2001

I'm modifying an ASP form to use for an member event RSVP. It's all working fine, except that I'd like an error message to be triggered if the member has clicked a radio button to indicate they would like to bring guests, but hasn't entered a value into the text input to tell us how many guests ...

All of the session error critera are working fine, except for this one bit. I have tried various configurations, but none seem to work. Currently the piece of code which should trigger an error is as follows:

If Len(Trim(Request.Form("member"))) = "with_guest" And Len(Trim(Request.Form("guest_no"))) = 0 Then
Session("txtError") = Session("txtError") & "Please advise the number of guests."
End If

with_guest is the value of the radio button indicating the member would like to bring guests.

Any clues? Thanks!

bug x

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

try this:

If Request.Form("member") = "with_guest" And Request.Form("guest_no") = 0 Then
    Session("txtError") = Session("txtError") & "Please advise the number of guests.<br>"
End If
'

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.