Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Form Validation for a Drop-Down List
Old 06-14-2006, 04:04 PM Form Validation for a Drop-Down List
Average Talker

Posts: 25
Trades: 0
Hi All,
I have a validation page for a form.
One of the fields is a drop-down list, where the default option is "Please select from list"
My validation code is:
Code:
<% IF Request.Form("Summary") <> "" AND Request.Form("Details") <> "" AND Request.Form("Rep") <> "Please Select From list" THEN
and form is validated.
But I don't think this is correct:
Code:
Request.Form("Rep") <> "Please Select From list" THEN
What I'm trying to achvieve is if "Please Select From list" is passed, this is not valid, so I need the code for

Code:
 
Request.Form("Rep") = "Anthing other than Please Select From list" is valid.
As usual, your guidance is very appreciated!
Lynn
devine is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-15-2006, 03:38 PM Re: Form Validation for a Drop-Down List
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Seems okay to me.

What are the actions if the form is valid vs. invalid?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 06-16-2006, 03:36 AM Re: Form Validation for a Drop-Down List
Average Talker

Posts: 25
Trades: 0
Hi Adam,
I have given the "Please select from list" a select value of "0".
The validation will now check that the value is not 0 and process correctly.
Seems too obvious really!
devine is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Form Validation for a Drop-Down List
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11491 seconds with 12 queries