Login Control LayoutTemplate Enter Key Event

G

Guest

I'm using the Layout Template for the Login Control. I've included all the
neccessary controls on the page and everything is working nicely except
hitting the enter key on any of the textboxes will not fire the login event.
This functionality is included if I am not using the Layout Template. Do I
need to add custom code to add this event back in? Any ideas on how I might
do that?

Thanks,
Tyler Carver
 
S

Steven Cheng[MSFT]

Hi Tyler,

Welcome to the ASPNET newsgroup.

As for the ASP.NET 2.0 Login Control, if you're using layout Template, then
all the html content and clientside script behavior need to be defined by
ourselve. And for the "enter key"/default button function you mentioned,
generally we can add some client script code for any textboxes in the
template, the code is attached to the textboxes' onkeydown event and will
locate the submit button and invoke its click method. Here are some web
article discussing on registering such client script for textbox to submit
form, you can reference some code there in your Login control's template:

#Enter Key in ASP.NET - Complete Research
http://www.beansoftware.com/ASP.NET-Tutorials/Accept-Enter-Key.aspx

#Using the enter key to submit a form
http://www.allasp.net/enterkey.aspx

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top