Show "AutoComplete" suggestion list on Button Click - AJAX (ASP.NET)


I have the following items on my web form:

1) TextBox
2) AutoCompleteExtender
3) Button

By default, if i type something in the "TextBox" then "AutoCompleteExtender" will show the suggestions. I want the suggestions list to show up when i clicked on "Button" not by default when i type in "TextBox". Can you please provide me the code for this functionality. Similary for closing the suggestion list also.

Who is Participating?

Improve company productivity with a Business Account.Sign Up

existenz2Connect With a Mentor Commented:
In your aspx for the AutoCompleteExtender tag:


and in your codebehind in the event from the button:

AutoCompleteExtender1.Enabled = true;

Or better said <ID of AutoCompleteExtender>.Enabled = true;
Disable the AutoCompleteExtender by default and only enable it by setting the Enabled property when the button is clicked.
milani_lucieAuthor Commented:
Can you please provide me "JavaScript" code to do this ? Thanks
milani_lucieAuthor Commented:
Can we do with "JavaScript" ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.