Wells-it.com - Web Hosting

ASP session errors ...

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 58 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,044 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 ["Max Albert"] [Email]
If there is no answer on Google, then there is no question.