Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > RequiredFieldValidator question..

Reply
Thread Tools

RequiredFieldValidator question..

 
 
James Radke
Guest
Posts: n/a
 
      10-14-2003
Hello,

I am placing a required field validator control to ensure that some data is
entered into a textbox, but when I bring up the web page, the required field
validator only generates a client side error AFTER the user has modified the
field once, and erased all data, and not if a user tabs to and past a field
that is initialized to blank?

Can someone tell me why this is happening?

Thanks!

Jim


 
Reply With Quote
 
 
 
 
Jim Shelly
Guest
Posts: n/a
 
      10-15-2003
The RequiredFieldValidator is a Server Control that uses a .js file for
client side messaging. When you set a requiredfieldvalidator on a textbox,
the validation doesn't take place until the page is posted back to the
server.

I haven't looked into it, but check out the Custom Validator Control. This
requires you to write the validation yourself, but it may allow you to add
the client side validation you wish on the "onBlur" event.

"James Radke" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I am placing a required field validator control to ensure that some data

is
> entered into a textbox, but when I bring up the web page, the required

field
> validator only generates a client side error AFTER the user has modified

the
> field once, and erased all data, and not if a user tabs to and past a

field
> that is initialized to blank?
>
> Can someone tell me why this is happening?
>
> Thanks!
>
> Jim
>
>



 
Reply With Quote
 
 
 
 
Yan-Hong Huang[MSFT]
Guest
Posts: n/a
 
      10-15-2003
Hello Jim,

Thanks for posting in the group.

We could enable client-side validation for your page. (By default it is
enabled) Client-side validation enhances the validation process by checking
user input before it is sent to the server. This allows errors to be
detected on the client before the form is submitted, avoiding the
round-trip of information necessary for server-side validation

Client-side validation works using client JScript. And the validation Web
controls script that is in a script library. Code in the script library
will be executed as users tab from field to field. The validation
conditions are re-evaluated when a dependent field is changed, and the
validator is made visible or invisible as appropriate.

For details, I suggest you read MSDN article:
"ASP.NET Validation in Depth"
http://msdn.microsoft.com/library/en...id.asp?frame=t
rue

This article discusses in detail how the ASP.NET validation controls work
and is recommended reading for anyone building complex pages with
validation controls or those looking to extend the validation framework.

Does that answer your question?

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ĘC www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Reply-To: "James Radke" <(E-Mail Removed)>
!From: "James Radke" <(E-Mail Removed)>
!Subject: RequiredFieldValidator question..
!Date: Tue, 14 Oct 2003 17:13:17 -0500
!Lines: 15
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <(E-Mail Removed)>
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
!NNTP-Posting-Host: cpe-24-167-241-101.wi.rr.com 24.167.241.101
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
!Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontro ls:15360
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
!
!Hello,
!
!I am placing a required field validator control to ensure that some data is
!entered into a textbox, but when I bring up the web page, the required
field
!validator only generates a client side error AFTER the user has modified
the
!field once, and erased all data, and not if a user tabs to and past a field
!that is initialized to blank?
!
!Can someone tell me why this is happening?
!
!Thanks!
!
!Jim
!
!
!

 
Reply With Quote
 
Yan-Hong Huang[MSFT]
Guest
Posts: n/a
 
      10-17-2003
Hello Jim,

Do you have any more concerns on the question? Please post here if there
are any questions on it.

Thanks for participating the community.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! ĘC www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!Reply-To: "James Radke" <(E-Mail Removed)>
!From: "James Radke" <(E-Mail Removed)>
!Subject: RequiredFieldValidator question..
!Date: Tue, 14 Oct 2003 17:13:17 -0500
!Lines: 15
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <(E-Mail Removed)>
!Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
!NNTP-Posting-Host: cpe-24-167-241-101.wi.rr.com 24.167.241.101
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
!Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontro ls:15360
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
!
!Hello,
!
!I am placing a required field validator control to ensure that some data is
!entered into a textbox, but when I bring up the web page, the required
field
!validator only generates a client side error AFTER the user has modified
the
!field once, and erased all data, and not if a user tabs to and past a field
!that is initialized to blank?
!
!Can someone tell me why this is happening?
!
!Thanks!
!
!Jim
!
!
!

 
Reply With Quote
 
Erica Lewis
Guest
Posts: n/a
 
      10-28-2003
I too I'm having this same problem and have no I Idea how
to resolve it. The validaion works on one server and
doesn't work on another. They are both running WINNT.
One server has VJSharp and the other doesn't but
otherwise they are both running the same framework
(v1.1.4322)...

>-----Original Message-----
>Hello Jim,
>
>Do you have any more concerns on the question? Please

post here if there
>are any questions on it.
>
>Thanks for participating the community.
>
>Best regards,
>Yanhong Huang
>Microsoft Online Partner Support
>
>Get Secure! ĘC www.microsoft.com/security
>This posting is provided "AS IS" with no warranties, and

confers no rights.
>
>--------------------
>!Reply-To: "James Radke" <(E-Mail Removed)>
>!From: "James Radke" <(E-Mail Removed)>
>!Subject: RequiredFieldValidator question..
>!Date: Tue, 14 Oct 2003 17:13:17 -0500
>!Lines: 15
>!X-Priority: 3
>!X-MSMail-Priority: Normal
>!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>!Message-ID: <(E-Mail Removed)>
>!Newsgroups:

microsoft.public.dotnet.framework.aspnet.webcontro ls
>!NNTP-Posting-Host: cpe-24-167-241-101.wi.rr.com

24.167.241.101
>!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!

TK2MSFTNGP12.phx.gbl
>!Xref: cpmsftngxa06.phx.gbl
>microsoft.public.dotnet.framework.aspnet.webcontr ols:1536

0
>!X-Tomcat-NG:

microsoft.public.dotnet.framework.aspnet.webcontro ls
>!
>!Hello,
>!
>!I am placing a required field validator control to

ensure that some data is
>!entered into a textbox, but when I bring up the web

page, the required
>field
>!validator only generates a client side error AFTER the

user has modified
>the
>!field once, and erased all data, and not if a user tabs

to and past a field
>!that is initialized to blank?
>!
>!Can someone tell me why this is happening?
>!
>!Thanks!
>!
>!Jim
>!
>!
>!
>
>.
>

 
Reply With Quote
 
Erica Lewis
Guest
Posts: n/a
 
      10-28-2003
I was able to resolve the problem by running
ASP.NET IIS Registration Tool (Aspnet_regiis.exe)

>-----Original Message-----
>Hello Jim,
>
>Thanks for posting in the group.
>
>We could enable client-side validation for your page.

(By default it is
>enabled) Client-side validation enhances the validation

process by checking
>user input before it is sent to the server. This allows

errors to be
>detected on the client before the form is submitted,

avoiding the
>round-trip of information necessary for server-side

validation
>
>Client-side validation works using client JScript. And

the validation Web
>controls script that is in a script library. Code in the

script library
>will be executed as users tab from field to field. The

validation
>conditions are re-evaluated when a dependent field is

changed, and the
>validator is made visible or invisible as appropriate.
>
>For details, I suggest you read MSDN article:
>"ASP.NET Validation in Depth"
>http://msdn.microsoft.com/library/en-

us/dnaspp/html/aspplusvalid.asp?frame=t
>rue
>
>This article discusses in detail how the ASP.NET

validation controls work
>and is recommended reading for anyone building complex

pages with
>validation controls or those looking to extend the

validation framework.
>
>Does that answer your question?
>
>Best regards,
>Yanhong Huang
>Microsoft Online Partner Support
>
>Get Secure! ĘC www.microsoft.com/security
>This posting is provided "AS IS" with no warranties, and

confers no rights.
>
>--------------------
>!Reply-To: "James Radke" <(E-Mail Removed)>
>!From: "James Radke" <(E-Mail Removed)>
>!Subject: RequiredFieldValidator question..
>!Date: Tue, 14 Oct 2003 17:13:17 -0500
>!Lines: 15
>!X-Priority: 3
>!X-MSMail-Priority: Normal
>!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>!Message-ID: <(E-Mail Removed)>
>!Newsgroups:

microsoft.public.dotnet.framework.aspnet.webcontro ls
>!NNTP-Posting-Host: cpe-24-167-241-101.wi.rr.com

24.167.241.101
>!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!

TK2MSFTNGP12.phx.gbl
>!Xref: cpmsftngxa06.phx.gbl
>microsoft.public.dotnet.framework.aspnet.webcontr ols:1536

0
>!X-Tomcat-NG:

microsoft.public.dotnet.framework.aspnet.webcontro ls
>!
>!Hello,
>!
>!I am placing a required field validator control to

ensure that some data is
>!entered into a textbox, but when I bring up the web

page, the required
>field
>!validator only generates a client side error AFTER the

user has modified
>the
>!field once, and erased all data, and not if a user tabs

to and past a field
>!that is initialized to blank?
>!
>!Can someone tell me why this is happening?
>!
>!Thanks!
>!
>!Jim
>!
>!
>!
>
>.
>

 
Reply With Quote
 
Yan-Hong Huang[MSFT]
Guest
Posts: n/a
 
      10-29-2003
Hi Erica,

I am glad to hear the problem is resolved. If the problem happens on one
machine and doesn't happen on another machien, the most possible reason is
in installation.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RequiredFieldValidator control giving problems. Please help. Gaurav ASP .Net 1 08-20-2003 02:26 PM
Setting Focus on field when RequiredFieldValidator fails - This Works! Steve Yerkes ASP .Net 3 08-01-2003 08:38 AM
Going crazy with requiredfieldvalidator controls . Kindly help me Navin ASP .Net 3 07-28-2003 06:50 PM
Question about RequiredFieldValidator pc ASP .Net 2 07-28-2003 03:30 AM
ASP:RequiredFieldValidator control is not working on Netscape 7. Rob ASP .Net 4 07-18-2003 05:34 PM



Advertisments