Custom Validator

  • Thread starter Serdar Kalaycý
  • Start date
S

Serdar Kalaycý

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

--
 
S

Serdar Kalaycý

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 said:
Hi,

take a look at this article:

ASP.NET Validation In Depth
http://msdn.microsoft.com/library/default.asp?url=/library/en-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:
(e-mail address removed)


Serdar Kalaycý said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top