Setting the DefaultButton prop of a Panel under a Mountain of Templates

  • Thread starter Thread starter Steve Prescott
  • Start date Start date
S

Steve Prescott

Hi Gang,

I am trying to set the DefaultButton prop of a Panel so that when the user
has entered his login credentials and strikes the < Enter > key, he will be
loggin in. The Button (btnLogin) is buried under this hierarchy of parent
controls: Panel > asp.LoginView > AnonymousTemplate > asp.Login >
LayoutTemplate > btnLogin. I can't figure it out. Thanks for any ideas.

Steve
 
Hu Munna,

I wanted to thank you for your suggestion. I tried that before the post and
it did not work. I wanted to return to the issue right after your post but
got caught up in another thing. If I find that solution, I'll post it.
Thanks.

Steve
 
I figured it out.

Problem: Because you want users to login with the <Enter> instead of
clicking a button, you want to make the login button of your login control
the default button of the panel that contains it but panel cannot see the
button because it is contained by a hierarchy of templates.

Solution: nest a panel directly inside the Anonymous Template of your
LoginView control. Make sure your Login control is contained inside this
template. Set the DefaultButton prop of that panel to this: <Name of Login
control><$><Name of Button>. So if your login control is named 'Login1' and
the button is 'btnLogin' then set the DefaultButon prop to
'Login1$btnLogin'.
 
Back
Top