how to call server side function in javascript function

right now I have a question. I have a javascript function which created a textfield. what I want to do is when the user type in the value into the textfield, it will call the function in the server side and search the data in the database. I wonder is it possible to do that? And how to do it, can anyone some me some example..thx


0 superwong2007 5/24/2007 9:26:10 PM

 look into ajax autocomplete

Liming Xu
Jumptree ASP.NET 2.0 Project Management - With Source Code, Free to Non Profit Org and Effectively Manage Projects/Tasks/Milestones
0 Liming 5/25/2007 1:48:50 AM


You definitely want to use Ajax (as was suggested). Since you're using ASP.NET 2.0, your best bet is to look into the ASP.NET AJAX framework. For complete information on the ASP.NET AJAX framework, visit  Specifically, to accomplish your scenario you may want to use the AutoCompleteExtender contained in the ASP.NET AJAX AjaxControlToolkit. The AutoComplete extender enables you to easily search a database as users enter text into a textbox.

If you'd like a more manual approach, you can also use the features of ASP.NET AJAX to manually call a server function using JavaScript. Check out this tutorial in the ASP.NET AJAX documentation for some help with that approach.

Let me know if that helps~ 

Todd Anglin
0 tanglin05 5/25/2007 12:25:19 PM

(Thread closed)