-
Event vs Enter Key
I think this is an easy Q, but I can't figure it out.... I have a button on a page that executes a query, and turns off a label. It works fine, when I click it. But if I hit the enter key I get the same query, BUT the label does not disappear. How do I identify hitting the enter key as an event?
-
Re: Event vs Enter Key
KeyDown Event
If (e.KeyCode == Keys.Enter)
{
Delicious..
}
-
Re: Event vs Enter Key
It sounds like your logic is scattered.
Put the application logic which hides the label in a single method. Call this method from any event handlers that trigger the logic process.
You should never put application logic in event handlers. Only interface logic and calls to application logic.