Solved

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

Posted on 2010-09-22
4
636 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

786 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