You really, really, don't want to be doing that!
Think about it: each time your user types a key, a postback has to occur to the server, the server has to create the page, handle the text change, access the database, wait for the response, format it to HTML and send it back to the client. Me, as a user I would have got bored and gone elsewhere by about the third keypress...
Do it in the client! Javascript should be able to handle it:
http://www.c-sharpcorner.com/UploadFile/5089e0/how-to-show-textbox-value-exit-in-database-using-javascript/[
^] does some of the work.