default button in child page?

G

Guest

I have a master page that has a button on it that is included on all of it's
child pages. On one of the chile pages, there is a login control. I would
like to have the login control become the default button when that page is in
use. Currently, if a user tries to log in, when they press the enter key,
the forms defaults to the actions of the button on the master page.

Any suggestios on how to fix this? I converted the login control to a
template, but i can't reference it as a default button in the form tag since
it is inside of the login control's template structure.

thanks for any assistance.
 
L

Leon Mayne

Fabuloussites said:
I have a master page that has a button on it that is included on all
of it's child pages. On one of the chile pages, there is a login
control. I would like to have the login control become the default
button when that page is in use. Currently, if a user tries to log
in, when they press the enter key, the forms defaults to the actions
of the button on the master page.

Add this line in your page.load event handler:

Page.RegisterHiddenField("__EVENTTARGET", "btnYourButtonName")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top