473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Validator Control

Hi,

In my webform i have few text box controls and 1 button control.
and for each text box i have placed

required field validatior.
and i set the following properties of

required field validator

Control to validate = the corresponding

text box name
display=dynamic
error message=must enter value
enableclient script=true

when am running my application if i directly goes to 2 textbox control with
out entering any value in 1st textbox then it has to display the error
message

which i had specified na but it is

not displaying any error message at

that time but it is displaying error

message after clicking on submit

button.
but what i need is it has to display this message
when the control lost its focus.
or before clicking on submit button.

can anybody tell me the solution for my problem.plz its urgent.
thanx in advance
yoshitha

Nov 19 '05 #1
5 1306
Hi yoshitha
make the autopostback of textbox to true
Hope this help:)

"Yoshitha" wrote:
Hi,

In my webform i have few text box controls and 1 button control.
and for each text box i have placed

required field validatior.
and i set the following properties of

required field validator

Control to validate = the corresponding

text box name
display=dynamic
error message=must enter value
enableclient script=true

when am running my application if i directly goes to 2 textbox control with
out entering any value in 1st textbox then it has to display the error
message

which i had specified na but it is

not displaying any error message at

that time but it is displaying error

message after clicking on submit

button.
but what i need is it has to display this message
when the control lost its focus.
or before clicking on submit button.

can anybody tell me the solution for my problem.plz its urgent.
thanx in advance
yoshitha

Nov 19 '05 #2

hi sara
i have set postback property of all the text boxes to true only.
tough i set am not getting the messages which i had provoded for these
controls .
am getting these messages after clicking submit button only but i want
todispay before clicking on submit button
Nov 19 '05 #3
to do this u must chang the property of enable validation to true but on
textbox i dont know how
"Yoshitha" wrote:

hi sara
i have set postback property of all the text boxes to true only.
tough i set am not getting the messages which i had provoded for these
controls .
am getting these messages after clicking submit button only but i want
todispay before clicking on submit button

Nov 19 '05 #4
set textbox autopostback property to true and add the following code to the
page_load event:

if ( Page.IsPostBack )
{
Page.Validate();
}

Hth. Kind regards,
Nikander & Margriet Bruggeman

"sara" wrote:
to do this u must chang the property of enable validation to true but on
textbox i dont know how
"Yoshitha" wrote:

hi sara
i have set postback property of all the text boxes to true only.
tough i set am not getting the messages which i had provoded for these
controls .
am getting these messages after clicking submit button only but i want
todispay before clicking on submit button

Nov 19 '05 #5
I set post back property true for all the text boxes.and for each text box i
also placed required field validator control.

so when i run my application if i enter any data in the first text box then
am getting the messages for remaining text boxes which i had set for
required field validator control.
why am getting all those messages before entering the data in remaining
text boxes?

can u tell how to solve this problem
thanx in advance
yoshitha
Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
8
by: Dmitry Korolyov | last post by:
ASP.NET app using c# and framework version 1.1.4322.573 on a IIS 6.0 web server. A single-line asp:textbox control and regexp validator attached to it. ^\d+$ expression does match an empty...
0
by: Bryce Budd | last post by:
Hello All, I've been a taker of information from newsgroups for a long time and thought I'd finally make a contribution back to the community whose supported me when I've needed it. After all...
2
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow...
2
by: Dune | last post by:
Hi there, If a control is disabled (enabled = false), will the validator controls associated with it automatically know not to carry out validation? I have a page with a bunch of controls and...
3
by: Angelos Karantzalis | last post by:
Hi guys, I've a small problem with validators. I'm building a single .aspx file that handles all my form posts. I need to be using ASP.NET validators ( or subclasses thereof ), so what i do to...
3
by: thomson | last post by:
Hi, I have 5 aspx pages, In one page i have a Compare Validator Control, The four aspx pages are loading fast with similar controls, no code behind, But the page having Compare Validator Control...
2
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validator to each control as needed, but the validators are not firing when I click submit....
0
by: Gonza | last post by:
Hi group, i'm trying to add a customvalidator control to a custom web control. The problem is i'm getting a "Unable to find control id..." exception. Here is the code: public class CuitTextBox :...
1
by: Gonza | last post by:
Hi group, i'm trying to add a customvalidator control to a custom web control. The problem is i'm getting a "Unable to find control id..." exception. Here is the code: public class CuitTextBox :...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.