Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 22nd, 2006, 01:23 PM
Authorized User
Points: 139, Level: 2
Points: 139, Level: 2 Points: 139, Level: 2 Points: 139, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Spokane, WA, USA.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default RequiredFieldValidator

Am using VisualStudio.Net to create ASP.Net pages. The validator is supposed to compare the InitialValue with the value of the text box it is validating when you tab to the next field. The ErrorMessage is supposed to display where the validator is if the Text property is not used. The initial value is supposed to be set to an empty string and I assume the text field value is too, so that if there is no [required] entry, then there is an error. But it does nothing when I am testing within Visual Studio running under Debug. Could it be that the initial value of the text field is null telling the validator that there is a change from an empty string? Or could it be that testing under Visual Studio does not use the control's validation as it would if tested in another way? Thanks for your ideas.
  #2 (permalink)  
Old April 23rd, 2006, 01:32 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

What is the HTML for the page? A required field validator simply checks if there is text in the textbox, if not, it will display the message. If you have an initial value in the textbox, and what to see if it has changed, the requiredfieldvalidator will not work.

  #3 (permalink)  
Old April 24th, 2006, 05:41 PM
Authorized User
Points: 139, Level: 2
Points: 139, Level: 2 Points: 139, Level: 2 Points: 139, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Spokane, WA, USA.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Reply to own question:
According to the knowledge base it compares the text property to the initial value in the validator just to make sure they are different after an entry is made.
P.S. How do you keep e-mails from coming to you about every new question that appears in the forum?

  #4 (permalink)  
Old April 24th, 2006, 10:00 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Click the Unsubscribe from this topic link.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RequiredFieldValidator Control bnorg ASP.NET 1.0 and 1.1 Basics 1 May 3rd, 2006 04:44 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



All times are GMT -4. The time now is 05:48 AM.


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