I have List of Countries in my Database. When I type the countries Name in Text box
it has to show the countries name that starts with that typed alphabetic character.
Ex:
I am typing the text " Ind " in text box , then it has to show the countries name that starts with the letter
"ind". Is there any features available in .Net to Implement this task.
More clearly please refer Google Search.In google search If we type Ind then it will show
some text that already we have searched or typed.
Can any one help on this regard.
Loading
Bechir BejaouiPosted Feb 26, 2009, 6:05 AM
Vijaya KadiyalaPosted Feb 23, 2009, 8:34 PM
Hi Bechier,
Wouldn't your create a performance issue for every Call when you type a character in textBox. The i way see is get everything in Java Script array and when ever TextBox Change event loop thru the Array display possible cutry names starting with the character.
Thanks -- Vijaya Kadiyala
Bechir BejaouiPosted Feb 19, 2009, 5:52 PM
CREATE PROCEDURE autocomplete
(
@CountryName nvarchar(20)
)
AS
Select Name from Table Where Name like @CountryName
GO
and call it from you code
you can implement the textchanged event handler so that when you type letters the text box will print the given country automatically