Hi,
I am using a Autocomplete textbox for "like" search text from Database using KeyDown Event. One of the scenario is COPY-PASTE textname to Autocompletebox where data is already available in Database.
I was unable to complete this scenario because when I try to paste the text, "Ctrl" is getting fired instead of "Ctrl+V" from keyboard.
Here is the code:
string a = autoCompleteBox2.Text + e.Key.ToString().ToLower();
if (FirstKey.Equals("ctrl") && string.IsNullOrEmpty(e.Key.ToString()))
{
a = autoCompleteBox2.Text;
}
if (!string.IsNullOrEmpty(a) && a.Length > 0 && !CurrentKey.Equals("ctrl"))
{
pvm.SearchDrug(4, a);
}
FirstKey = e.Key.ToString().ToLower();
this event is taking "Ctrl" instead of "Ctrl+ V".
Please help me regarding this.
Thanks, Srinivasa