General .NETFor general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums. If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category.
** PLEASE BE SPECIFIC WITH YOUR QUESTION **
When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the General .NET section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
Help needed regarding autocomplete textbox in dot net 2.0
Hi,
Method1
--------
I am trying to create a textbox that provides autocomplete feature using a database table (SQL Express) as the source, in dot net 2.0 C#.
I am assigning the AutoCompleteCustomSource property of this textbox to the collection got from the data table at every TextChanged() event of the textbox.
It worked fine. But I get an exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt" sometimes when I type into the textbox
Method 2
---------
Alternatively, I tried to process the input text onlyif the user is idle for sometime say some 2 seconds while entering the text into the textbox,. For this, I used a System.Windows.Forms.Timer object, call its start() method at the textchanged event, set its interval to 1 second in the initialzation of the application and in the Tick event write the code to associate the AutoCompleteCustomSource property.
But here, the drop down box appears only for one second and disappers.