you can go thru this
http://www.c-sharpcorner.com/UploadF...eExtender.aspx with an update panel and thn later on you can follow below two steps.
1. have below jscript in your head of the page where your AutoCompleteExtender is placed
-
<script type="text/javascript">
-
function Test(sender,e)
-
{
-
-
__doPostBack("UpdatePanel1",sender._element.value) ;
-
-
}
-
-
</script>
2. Have something like this in your page_load
-
private void Page_Load(object sender, System.EventArgs e)
-
{
-
Page.RegisterHiddenField("__EVENTTARGET", "btn");
-
TextBox1.Attributes.Add("onkeypress", "return controlEnter('" + btn.ClientID + "', event)");
-
//btn.Focus();
-
TextBox1.Attributes.Add("autocomplete", "off");
-
-
if (IsPostBack)
-
{
-
-
if (Request.Form["__EVENTTARGET"] != null &&
-
Request.Form["__EVENTTARGET"] == "UpdatePanel1" &&
-
Request.Form["__EVENTARGUMENT"] != null)
-
{
-
abc = Request.Form["__EVENTARGUMENT"];
-
//this is the selected value - what you have selected in dropdown of AutocompleteExtender and later on you can run the query into database based on this value..in my case it was name and i fatched id thru name
-
}
I hope it will help you..