1

I'm not really sure where or what to search for regarding the following question:

I have a TextBox control and a Label control on my page. I have a database query ready and I would like to run it on the TextBox textchanged event in order to display a "valid" or "not valid" text in the Label.

How can I achieve this without posting back the entire page on each textchanged event? I have installed the AJAX Control Toolkit and got the samples working but I don't seem to find an extender that would fit the bill. Any tips? Much appreciated, thank you.

1
  • My recommendation would be to research WCF, jQuery's .ajax() method, and possibly ASP.NET MVC. --- WCF for pushing and pulling data from your db. ASP.NET MVC to force you into abstracting your layers. jQuery ajax to interact asynchronously between the two. Commented Apr 20, 2012 at 19:34

1 Answer 1

1

Firstly, move away from the AjaxControlToolkit. This is for lazy web developers who dont know what they are doing.

Secondly, check out jQuery Ajax. Learn how to use it properly in order to do what you are needing to do.

Basically what you will need to do is post via jQuery Ajax to your page/webservice in order to run the database query. You can then return your data to the page and update the UI.

http://api.jquery.com/jQuery.ajax/

Sign up to request clarification or add additional context in comments.

1 Comment

I will mark this as the answer I was looking for. It pointed me where to look for. The two other 'answers' below are... well... bad. One is advising to use MVC for a simple async call and the other is just a troll. If anybody falls on this thread at a later stage, know that I found the answer I was looking for here: encosia.com/… after searching, as Tim suggested, for "jQuery AJAX ASP.NET" on Google.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.