tags:

views:

47

answers:

2

The thing is that there are number of items in the HTML select list. I want to click on any of the items, then query the database on the id of that item, retrieve the value and then display that in the textbox. How would I query the database?

I would really appreciate that if someone provides a code sample for querying the database.

+5  A: 

Have jquery fire an ajax call to your server. Your server is what will actually query the database.

x1a4
A: 

Something like

$.get('/ajaxquery/yourselectvalue', function(data) {
  $('#yourTextBox').val(data);
});
NinjaBomb