Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

ValidatorOnSubmit and Ajax calls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rm1234@gmail.com - 26 Sep 2007 00:01 GMT
All,

I am using XmlHttp / PageMethods to refresh a portion of web page that
contains some asp.net validators that are enabled for client side
validation. But before I submit Ajax post request I want to be able to
use the client-side validation provided by asp.net controls. I tried
calling ValidatorOnSubmit() function before doing xml http postback
from javascript but it always returns true even though some required
fields are empty. on the same form if I keep a submit button all
validations work properly.
Is it possible to trigger ValidatorOnSubmit() from javascript so that
it validates all client side validations ?

Thanks in adv for help,
ram.
Chris Fulstow - 26 Sep 2007 01:54 GMT
Hi Ram

Try calling Page_ClientValidate() and checking its return value.  This
should trigger the client-side validation.

Chris

On Sep 26, 9:01 am, rm1...@gmail.com wrote:
> All,
>
[quoted text clipped - 11 lines]
> Thanks in adv for help,
> ram.
Ram - 26 Sep 2007 16:09 GMT
> Hi Ram
>
[quoted text clipped - 22 lines]
>
> - Show quoted text -

Thanks Chris!!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.