views:

27

answers:

1

I have a Web User Control I created for authentication. The web user control is inside the box below. Clicking any button (1 or 2) below works correct as it goes to the correct c# button click event in the code behind file. If I press enter on fields a or b it goes to the correct callback (button1's) if I press enter on field c it still goes to button1's callback, not button2's

How can I give my web user control a nice self contained for and view state etc, so it wont mess with the remainder of the page's form?


 +--------------+
 | User: __a___ |
 | Pass: __b___ |
 |     [button1]|
 +--------------+

 Prompt:______c______ [button2]
+1  A: 

You can use a Panel and set the default acceptbutton.

Example here

rdkleine