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

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
 
U

Uriah Piddle

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
 
S

Steve Prescott

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'.
 

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

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top