.NETGURU
Validation Query
Messages   Related Types
This message was discovered on ASPFriends.com 'aspng-validators' list.


Julian Voelcker
-- Moved from [aspngfreeforall] to [aspng-validators] by Tim Musschoot <Click here to reveal e-mail address> --

I have a form and am using validation to ensure that the users enter
the correct data.

In one of the fields the users are entering some data that I need to
check against a database (it's a discount code for a purchase).

When the form is submitted is there any way that I can check the
database and then if they have entered an invalid code, throw them back
to the page giving a standard validation failure?

I know that I can write my own code to do this, but was wondering if I
could just set something like Page.IsNotValid().

Cheers,

Julian Voelcker
The Virtual World (UK) Limited
Cirencester, United Kingdom

Reply to this message...
 
    
Glavich, Paul C
Try ValidatorControl.IsValid = false which should trigger the error message
display.

* Paul Glavich
Professional Web Services
Email: Click here to reveal e-mail address
Urgent Messages: Email Click here to reveal e-mail address and place urgent in subject line.
(Currently no fixed phone or street address)

-----Original Message-----
From: Julian Voelcker [mailto:Click here to reveal e-mail address]
Sent: Tuesday, 16 July 2002 8:12 AM
To: aspng-validators
Subject: [aspng-validators] Validation Query

-- Moved from [aspngfreeforall] to [aspng-validators] by Tim Musschoot
<Click here to reveal e-mail address> --

I have a form and am using validation to ensure that the users enter
the correct data.

In one of the fields the users are entering some data that I need to
check against a database (it's a discount code for a purchase).

When the form is submitted is there any way that I can check the
database and then if they have entered an invalid code, throw them back
to the page giving a standard validation failure?

I know that I can write my own code to do this, but was wondering if I
could just set something like Page.IsNotValid().

Cheers,

Julian Voelcker
The Virtual World (UK) Limited
Cirencester, United Kingdom

| [aspng-validators] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/aspng-validators.asp = JOIN/QUIT

Reply to this message...
 
 
System.Web.UI.Page




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification