.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Auto-complete extender and default button of a panel - Enter key issues

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :ASP.Net

Hi. I have a text box with an auto-complete extender attached to it. This is in a panel. Now, I have set the default button of the panel to the submit button of the panel.


      <text box/>




Now, I find that when the auto-complete options show up and I try to select an option using the enter key, the button is pressed (triggering a postback) due to it being the defaultbutton of the panel.

I want to be able to select an aut-complete option using the enter key and yet not post back. Therefore, the enter key (when the text box is in focus) should not trigger a postback. How can I achieve this?

View Complete Post

More Related Resource Links

auto complete extender stops


Hello everyone

when the textbox of the  autocomplete extender looses focas the auto complete extender stops the returning any results or even firing events(onpopulating, onpupulated).

Could you please help me fix this.


and I there any way to know when the extender fires the request(please provide code example if you can).


thanks a lot.

Auto Complete Extender Not Working

I have written everything in that Control but that extender is not working. my Webservice is working properly Plz tell me solution.  

Auto Complete Extender key value pair in Listview



I'm pretty new to ASP.Net and I came across a problem using Ajax AutocompleteExtender. Currently I'm trying to update the database table through ListView. More precisely - I'm trying to update foreign key (PARTNER_ID). Basically I need the DropDown functionality out of a Autocomplete Extender because I have a very long list of partners. I managed to get key/value pairs back to Autocomplete Extender but I can't insert the value into a hidden filed that I use to update the table. This is as far as I got - the error I get from compiler is:

Compiler Error Message: CS0103: The name 'ACEValueEdit' does not exist in the current context

Here is the code:


Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="OdgovorneOsobe.aspx.cs" Inherits="Farmex_CRM.WebForm3" %>

<%@ Register Assembly="AjaxControlToolkit&q

AJAX Auto Complete Extender with Database


Hi Guys

I have decided to use the Ajax Auto complete extender with a database, i found some cool articles on google to do this, but i cannot get it to work, I am trying a simple example where i have 1 textbox and i am trying to obtain products from the products table in the northwind database, heres my code (its not working)

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" MinimumPrefixLength=&quo

Modal Popup Extender and an Update Panel - "Cancel" Button problem


This should be a quick "yes" answer - I am in the process of creating a very simple test, but I thought I'd ask on here too (also, so other people might be able to find the answer, if they have the same problem).

I have created a modalpopupextender that opens up a panel containing an update panel.  I have a cancel button that is tied into the MPE's [CancelControlID] property and this closes the popup when I click it.  However, if I perform a partial postback within the update panel, the cancel button no longer works.  I have found an example online that seems to imply that the cancel button (and I'm guessing, by association) and the OK button should be outside the update panel.  Does the partial postback break the buttons' client script bindings, and thus should they always be placed outside the update panel?

MVC2: Set default button for 'Enter' Key


I have the following code in a View:


            <% if ( Model.IsLoggedIn != true ) { %>
                <input class="NavButton" type="submit" name="submitButton" value="Previous" /> 
                <input class="NavButton" type="submit" name="submitButton" value="Login" /> 
            <% } %>

How do I set the "Login" button as the default button for when the "Enter" key is clicked on the keyboard?


Thank You ! 

Auto Complete extender is not working in Web User Control



I am using auto complete extender and it is not working in Web user Control . But Working in Web form Please give its solution ASAP.

Cs Code

    public static string[] GetSuggestions(string prefixText, int count)
        MyDatabaseDataContext db = new MyDatabaseDataContext();
        return db.Movies
            .Where( m => m.Title.StartsWith(prefixText) )
            .OrderBy( m => m.Title )
            .Select( m => m.Title)

<asp:TextBox  id="txtMovieTitle"  AutoComplete="off"  Runat="server" />
    <ajax:AutoCompleteExtender   id="ace1"

auto complete extender


I'm new-ish to asp.net/vb...and just now trying to implement the ajax autocompleteextender & using web services for the first time,...So please understand if my question is vague...

I’m trying to implement the ajax autocompleteextender onto an existing page I have…

 It’s not working…I think I’m probably not creating the web service correctly???  As of now, I have a “dummy” web service…it should just return “hello world” as an option when the user types anything into the test textbox.  I don’t see that it’s calling the web service at all.  Nothing happens when I type in the testAutoComplete textbox.  No errors.  Is there a way to test if it’s even calling the web service?  Or, run the web service by itself, to see if that is created OK?  This might be the first ajax thing I have in my website…so maybe the site is not “ajax-enabled” or something?  But, the “<asp:AutoCompleteExtender>” does not error, so I kinda don’t think so?


Here’s my aspx page with the autocompleteextender (/ProductMaintenance/Main/ProductSearch.aspx):

 <asp:TextBox ID="testAutoComplete" runat="server"></asp:TextBox>


i want to set textbox(txtTitle) and button by clicking linkbutton but due to update panel it is not

Here this is my html code.....i want to set txtTitle and btnAdd by the GridView1's value....i tried Trigger.but unable to get desired output..can anyone draw me out of this problem??======================================================================================<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">    </cc1:ToolkitScriptManager>    <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0"         Width="500px">               <cc1:TabPanel runat="server" HeaderText="Add Category" ID="TabPanel1">            <HeaderTemplate>Add Category            </HeaderTemplate>        <ContentTemplate>                <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>        <asp:Panel ID="Panel2" runat="server" Width="485px"    GroupingText=&q

Collapsible Panel Extender Issue

Hi Everyone,I am facing strange problem when using the Collapsible Panel Extender inside a gridview. It saying control with the same id cannot be added to the application. Please suggest me solution in this regard asap.Thanks in advance...

Rectangular Default Windows Button

Hi i am messing a bit with styles. I think the following code should make the normal "Button" rectangular, but on my Windows 7 machine only the left side of the button. The blue focus rectangle never changes its rounded corners. <Button> <Button.Resources> <Style TargetType="theme:ButtonChrome"> <Setter Property="RoundCorners" Value="False" /> </Style> </Button.Resources> Rectgangle Button </Button>  I used ' xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" '. Thanks and Greets Balkoth

change tab index by pressing enter button widthout postback

hi .  i have 3 textbox :<asp:textbox id="textbox1" runat="server" text="01" ></asp:textbox><asp:textbox id="textbox2" runat="server" text="02" ></asp:textbox><asp:textbox id="textbox3" runat="server" text="03" ></asp:textbox>  how i can focus on textbox2 from textbox1 by pressing enter button (widthout postback)?

Is possible...? set enter key button for gridview footer template..

http://geekswithblogs.net/dotNETvinz/archive/2009/06/04/adding-dynamic-rows-in-gridview-with-textboxes.aspxI have used the above grid view in my application . Its working good, no problem. Upon clicking the Addnewrowbutton, it uses to create a new row dynamically. What i need is, new row should also be created dynamically, upon pressing enter key in the last textbox on a particular gird view row.  User always can't go and click addnewrowbutton every time to create new row. Instead of it, user can press enter in the last textbox on a particular grid view row to create new row. Hope you guys have understood. Please Note: Here I have used master page.

How to create auto complete textbox

Hello I saw many examples from google. But there are nothing that the textbox is automatically completed by data from database. How can I do this. I like this example http://flux88.com/blog/jquery-auto-complete-text-box-with-asp-net-mvc/  but how can I modify it. 

show modalpopup extender in radio button click.



I have a radio button list and it is populating data from database.

I want to show a modal popup extender when someone clicks a specific value in the radio button list.

For example:

display the modal popup when radiobuttonlist.value=="13".

is this possible??

modal pop up extender button click is not firing


Hi All,


I have a modal pop up extender that is working fine. Inside the modal pop up window I have 2 buttons yes No

If I click on yes I am redirecting it to a diff page. No is simply closing the pop up.

In my .cs file buttonclick I added the response.redirect();

But my OnClick="BtnYes_Click" is never getting fired although I click on the yes button. What is wrong?



<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" >
                   <asp:Button ID="btnTarget" runat ="server" style="display:none" />

How to capture a button click inside a collopsible panel???



I have a webform that has a coloopsible panel I want to put a button inside the colopsible panel. How do I capture the button click in the code behind?

Thank You

Here is my code: I want to capture the button click of Button1

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
       <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend