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

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

How to create auto complete textbox

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :ASP.Net
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. 

View Complete Post

More Related Resource Links

how to get an array of all the asp.net textbox control inside create user wizard control?



How can I get all the textboxes inside a create user wizard control using getElementsByTagName().

Below is my JQuery code:

<script type="text/javascript">
        function addLoadEvent(func) {
            var oldonload = window.onload;
            if (typeof window.onload != 'function') {
                window.onload = func;
            } else {
                window.onload = function() {

        function prepareInputsForHints() {
            var inputs = document.getElementsByTagName("asp:TextBox");
            for (var i = 0; i < inputs.length; i++) {
                inputs[i].onfocus = function() {
                    this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
                inputs[i].onblur = function() {
                    this.parentNode.getElementsByTagName("span")[0].style.display = "none";



<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

Making auto suggestions more appropriate for your textbox

To round out my coverage of Input Contexts we need to cover the concept of Input Classes. Put simply an input class is a hint to the Windows Mobile OS as to what kind of information should be entered into a text box (for example an email address, phone number, or person's name).

Selecting an Input Class for a textbox will change the source of data used for the auto suggestions provided by the OS as the user starts typing. For example in the screenshot above you can see the user is typing in a person's name yet the operating system is suggesting matching cellphone numbers.

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.

create Scheduled Task that auto send mails


hello every one

i bought a hosting plan that allows me to send about 500email/per hour

but my client wish to send about 2000 or 3000 email at a time

is there a way to split them and 500 email per a time automaticly without the need of reloging again every hour

my hosting plan doesn't allow me to create a sql jop or send mails via Sql Server.

any bright ideas ?

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.  

"The Server could not complete your request" on trying to connect to a site or create a new site wit

I am trying out SharePoint Designer 2010 on windows 2008 with SharePoint 2010 beta installed. When I try to connect to a site or create a new site I get the error: "The server could not complete your request.  For more specific information, click the Details button." When I clicked the Details button it says "Object moved" on one line then on the next it says "Object moved to here". I wanted to see the new workflow stuff but I cannot connect to a site.

Auto Create Statistics - when does creation occur?

Hi. I've been asked to enable auto create statistics and auto update statistics on a production database that is suffering perfmormance problems. This seems a sensible move. However, I'm concerned about an inital performace hit when I turn auto create statistics on. When does the creation of statistics actually take place? Thanks.

How to auto create (or Generate a script) which can create indexes on subscriber


In our scenario, subscriber and publishers have same tables and we want the indexes also to be same at all places..

How to auto create (or Generate a script) which can create indexes on subscriber which are already added on publisher.. Is there a auto way or is there any article somewhere which can help..


IMP : There might be a delay in posting replies due to time difference (GMT +2:00) and Friday's Holiday instead of Sunday.

Please help. I need to create the element name by the value in that column (weekday) - FOR XML AUTO


 I need to create the element name by the value in that column (weekday).

I have query



if (OBJECT_ID ('tempdb..#dayWeek') is not null ) DROP TABLE #dayWeek;



([id] numeric(1), [name] varchar(15));


INSERT INTO #dayWeek ([id],[name]) VALUES (0, 'Monday');

INSERT INTO #dayWeek ([id],[name]) VALUES (1, 'Tuesday');

INSERT INTO #dayWeek ([id],[name]) VALUES (2, 'Wednesday');

INSERT INTO #dayWeek ([id],[name]) VALUES (3, 'Thustday');

INSERT INTO #dayWeek ([id],[name]) VALUES (4, 'Friday');

INSERT INTO #dayWeek ([id],[name]) VALUES (5, 'Saturday');

INSERT INTO #dayWeek ([id],[name]) VALUES (6, 'Sunday');


SELECT * FROM #dayWeek as day




which generates XML ...



<day id="0" name="Monday" />

<day id="1" name="Tuesday" />

<day id="2" name="Wednesday" />

<day id="3" name="Thustday" />

<day id="4" name="Friday" />

<day id="5" name="Saturday" />

<day id="6" name="Sunday" />


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


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?

Auto complete control in User control



I have inplemented the auto complete extender in a web form (with a static method)..works fine.

Now I have  moved the functionality into a user control and the auto complete extender is not working.

Any idea?


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

Silverlight - Textbox on focus wait till a Asynchronous process is complete



I have a textbox, where i call its lostfocus event when the value changes.

In lost focus i do a Asynchronous process to update a grid with the text entered. 

I have a scenario in which immediately after changing the value in textbox i hit a button, though the button click event raises i want it to wait till the asysnchronous process in lost focus of the textbox is complete. i want to do this as i use the result from lostfocus in button click event.

Please let mt know if there is a way to make the lost focus wait till it completes the asynchronous call.



Accessing Auto-Generated Textbox in Gridview


Dear All,

 I have a gridview which has autogenerate Columns Property "TRUE", and i'm dynamically binding this gridview with columns with sql database dataset. there is no data in sql but i am successful in showing blank gridview on form, now i want textboxes in gridview attached with each column, so i wrote code in RowDataBound which generates textbox automatically and assigns ID to each textbox, nw i want to insert that data from textbox to database but i'm not getting text which is entered in those textboxes, as i am accessing that textboxes using findcontrol and passing the id like gridview1_ctl03_text0. but i''m not getting any value from textbox please help?? 

In short i want to access auto generated textbox (with out any id predefined ) values from footer of gridview ?can any one please help?

How to create a Custom TextBox Control to provide the custom functionality



I have a requirement that I need to develop a custom textbox control which should support the functionality like:

1. Should display the Default Cursor as Cross Cursor

2. Textbox should be displayed like excel sheet cell (specific to cell) and when user will click the TextBox it should be selected but can not be entered any data inside.

3. Context Menu should be displayed with some information while double clicked on the TextBox but should not be edited the textbox.

4. Context Menu should be displayed if right click on the TextBox

6. TextBox should be on entry mode if user presses any ALPHNUMERIC key from Keyboard.

7. DataValidation should be there when user enters any data.

Can anyone help me on this how to develop such kind of control or May be somebody has already done those things and can give me a hint...

Thanks in advance for the help.



Auto create tree view nods with sqlDatasource



I want to auto create a tree view in which the tree nods will automatically corresponded to all values in a specific sql table column.

How do I do that?


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
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