I have text box for ID. I want user to enter the ID and when he presses the Enter key I fetch some information from that specific ID from database.
how can capture the key stroke as I described?
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char) Keys.Return)
{
...
}
}