Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2003, 06:31 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default Compare Validator

Hello All,

   I am tring to use a conpare validator but having problems. I have a drop down list that is databound, the first value I add manually which is a blank, with a value of "". when the user wants to save the data, I want to be sure they do not pick the blank item. I set the control to the dropdownlist, operator to equals, and value to compare to "", I placed a blank by hitting the space bar. This does not work. What am I doing wrong, should I use another validator control???

Thanks..

Jim

 
Old December 9th, 2003, 10:30 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Maybe you should try a value that won't interfere with legal values but not be blank. Sometimes I'll use -1 for an integer field that will always be positive.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old December 9th, 2003, 12:03 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Thanks. I acutally wound up using a required field validator, and that worked when the value was blank.

JIm






Similar Threads
Thread Thread Starter Forum Replies Last Post
compare these date fields and compare and get the susanring Oracle 1 July 24th, 2006 04:58 PM
Control validator Lofa ASP.NET 1.0 and 1.1 Basics 0 February 21st, 2006 01:57 PM
validator and LookupDispatcherAction jophy XML 0 September 2nd, 2004 09:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.