Click here to Skip to main content
12,824,299 members (41,141 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET validation
Hello everybody!

I seem to have a very common problem, about which I have Googled for many hours now, but could not find a solution...

My Custom-Validator in ASP.NET just won't work!
    ErrorMessage="This ISBN already exists"

The function in my C# code is just NEVER being fired. I have tried debugging and everything, even "cusvalISBN.Validate()" does NOT call the function...

I am already using this validator in combination with a Requiredfieldvalidator. So empty text is not possible! The weird thing is: I already had the same problem a few days ago on another page... after some hours, it suddenly worked. I could reproduce the change I had done to make it working. The new code is just copied and pasted and yet, it isn't working :-(

Any ideas??
Posted 11-Mar-10 14:20pm
Updated 12-Mar-10 14:03pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hi nishantsagar83!
Thank you very much for your answer!
Since I usually only use the sourcecode tab, i was really hoping this would do it... but it didn't:(
I mean, even when i click on the error text in design view, then my cursor jumps to the function for the Custom Validator, but it still is not called :-(
Is that a bug??
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


try switching to design view and then back to html view and code view...

sounds stupid.. but it does work sometime... thing's that sometimes the methods are not bound properly and switching between modes makes studio bind them again properly...

do let me know if u find some proper solution..


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 15 Mar 2010
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100