Hi all
The county code should match only the starting characters not the characters in between. For example, If the user types "UN", it can only list counties starting with "UN"
thanks in advance
Hi all
The county code should match only the starting characters not the characters in between. For example, If the user types "UN", it can only list counties starting with "UN"
thanks in advance
If its a TextBox you are using you want to use the TextChanged event
private void textBox_TextChanged(object sender, EventArgs e)
{
foreach(string County in MyCountyList)
{
if(County.StartsWith(textBox.Text))
{
//Do work (Add to list or ComboBox or whatever autocompletion you require)
}
}
}
If you are using a ComboBox, don't forget to clear the list each time the user changes the text entered. Hope this helps!