473,385 Members | 1,772 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,385 software developers and data experts.

Custom Validator

I added a custom validator and added some code to its ServerValidate event
but when a data which is not accepted is entered, it gives the warning as it
should do, but doesn't stop the execution of Click event of my submit
button. RequiredFieldValidator for example, gives the error when the field
is empty and does not let the code continue execution. So do I miss
something in definition of CustomValidator?

Serdar KALAYCI

--

Nov 17 '05 #1
1 5607
Ok, I understand that I have to use client side validation with server side
validation. But I cannot access server side components in my client side
script (eg. TextBox1.Text) and because my validation relies on more than one
component, it's also impossible to get the values from parameters. What must
I do?

Serdar Kalayci
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:u4**************@TK2MSFTNGP12.phx.gbl...
Hi,

take a look at this article:

ASP.NET Validation In Depth
http://msdn.microsoft.com/library/de...us/dnaspp/html
/aspplusvalid.asp
It will explain you all the details about validation, including
CustomValidator.

--
Teemu Keiski
MCP,Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com

Email:
jo****@aspalliance.com
"Serdar Kalaycý" <se***********@unisec.com.tr> kirjoitti viestissä
news:e9**************@tk2msftngp13.phx.gbl...
I added a custom validator and added some code to its ServerValidate event but when a data which is not accepted is entered, it gives the warning as
it
should do, but doesn't stop the execution of Click event of my submit
button. RequiredFieldValidator for example, gives the error when the

field is empty and does not let the code continue execution. So do I miss
something in definition of CustomValidator?

Serdar KALAYCI

--


Nov 17 '05 #2

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

Similar topics

2
by: Mike P | last post by:
I have a Custom validator that has ControlToValidate set to a textbox that also has a Required and RegularExpression validator. When I run the webpage on my machine the custom validator...
2
by: Evgueni | last post by:
Hello, I am new to .NET, and a custom validator is giving me a lot of grief. I want to use a Custom Validation control and for some reasons it's not firing the validation procedure. I am using...
8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
5
by: Mattyw | last post by:
Hi, I'm relatively new to Web Forms, I have been using Required Field Validators and Regular Expression Validators on a Web Form I am developing and everything works as expected using Visual...
2
by: Alan Silver | last post by:
Hello, I have a custom validator on my page, and have the server-side code working fine. I want to add a client-side funtion as well, but am not sure how to wire it in so that it works with the...
9
by: wardy1975 | last post by:
Hi All, Looking for a little expert advice on a few web standards issues. I am currently trying to understand the impact of web standards for a web application I work with. I have been doing a...
3
by: Andy | last post by:
Hi folks, I have a customvalidator control that works properly if it isn't contained in an ASP:TABLE. But, when I place it inside an ASP:TABLE, I find that _ServerValidate doesn't get fired,...
0
by: tsw_mik | last post by:
I have created a custom control. It has: -label -button -list of textboxes -list of dropdownlists. I want to use a custom validator to perform some validation, but somehow I can't fo it. The...
4
by: Rick | last post by:
Hello, I built a composite web control that has a textbox and a date control. added my custom control on a webform where there are other standard controls. Each control on the form has a...
1
gagandeepgupta16
by: gagandeepgupta16 | last post by:
Hi I am working on an entry form using validation controls in ASP.NET. I have two controls which requires custom validators, no issue in using plain custom validators. But when i am using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.