I can’t believe that this hasn’t been covered before, but I have been having a hard time finding an answer to this one on Google.
I am learning AJAX with ASP.NET, and I have a working prototype. My only problem is that I want to kick off my AJAX validation on a JavaScript event (onKeyUp to be exact) however, ASP.NET seems to only support its server side events for its version of AJAX. How do I call my AJAX from a client side event?
Thanks
UPDATE
Just wanted to add that I did find this trick out there, but this causes the website to do a postback, which makes no sense to me if your trying to do AJAX.
txtFirstName.Attributes.Add("onKeyUp","__doPostBack('ctl00_ContentPlaceHolder1_txtFirstName','')");
It sounds like you’re doing Web Forms stuff and you want to validate some content as its being typed or at least after they submit the data.
You might want to take a look at the ASP.NET Ajax Toolkit. You can download the .dll and add it as a reference to your project.
Take a look at the ValidatorCallOut