|
-
Nov 10th, 2006, 06:12 PM
#1
Thread Starter
Hyperactive Member
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?
-
Nov 10th, 2006, 06:30 PM
#2
Frenzied Member
Re: Event vs Enter Key
KeyDown Event
If (e.KeyCode == Keys.Enter)
{
Delicious..
}
-
Nov 12th, 2006, 06:15 AM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|