Have a look at this article:
ClientCallback custom control for web applications[
^]
This passes the nodeID to Stored Proc and get backs data.
You have to access the textbox in your Javascript. Associate any event like, onchange or onblur to the callback and in the javascript method, use the value to pass on to server side to get data.