Solved

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

Posted on 2010-09-22
4
630 Views
Last Modified: 2012-05-10
Hi,

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.

Thanks
0
Comment
Question by:milani_lucie
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:existenz2
ID: 33734679
Disable the AutoCompleteExtender by default and only enable it by setting the Enabled property when the button is clicked.
0
 

Author Comment

by:milani_lucie
ID: 33735032
Can you please provide me "JavaScript" code to do this ? Thanks
0
 
LVL 14

Accepted Solution

by:
existenz2 earned 500 total points
ID: 33743372
In your aspx for the AutoCompleteExtender tag:

Enabled="False"

and in your codebehind in the event from the button:

AutoCompleteExtender1.Enabled = true;

Or better said <ID of AutoCompleteExtender>.Enabled = true;
0
 

Author Closing Comment

by:milani_lucie
ID: 33765872
Can we do with "JavaScript" ?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now