Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 April 30th, 2006, 01:46 PM
Authorized User
 
Join Date: Aug 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default RequiredFieldValidator Control

The Framework Gen.Ref. says "the input control fails validation if the value it contains does not change from its initial value. By default the initial value is an empty string." It continues with "the InitialValue property does not set the default value of the control. It simply indicates the value that you do not want the user to enter in the input control." But the framework seems to contradict itself by saying that the InitialValue property "gets or sets the initial value of the associated input control." So if I did not set my InitialValue property then I assume its an empty string, and if there was no entry in the associated text box then I also assume its an empty string. But why doesn't the error message appear when the rule seems to be broken that there is no change from empty string to something other than an empty string?
 
Old May 3rd, 2006, 04:44 PM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just a quick thought but is your ControlToValidate property set to the correct textbox? Otherwise the default InitialValue if left blank will assume that a blank text box is a rule violation and should throw the error.





Similar Threads
Thread Thread Starter Forum Replies Last Post
RequiredFieldValidator bnorg ASP.NET 1.0 and 1.1 Basics 3 April 24th, 2006 10:00 PM
RequiredFieldValidator g2000 ASP.NET 2.0 Basics 1 December 22nd, 2005 06:23 PM
RequiredFieldValidator GuyB ASP.NET 1.0 and 1.1 Basics 1 November 23rd, 2005 03:11 PM
requiredfieldvalidator suzila ASP.NET 1.0 and 1.1 Basics 5 January 9th, 2004 08:19 AM





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