ASP.NET 2 Web Login Control On Page Load

D

Daniel Friend

I have a page with the Login Control. If I type the user name and password
and click the enter key the page reloads without doing the
login.authenicate.... if I click the actual login button, everything works
fine. How to I have it work that if the person does not press the login
button, but enters the username and password, do the login.authenicate?

Thanks,

Dan
 
S

Steven Cheng[MSFT]

Hi Dan,

Welcome to the MSDN newsgroup.

As for the Login Control, by default it is in encapsulated mode so that we
can not quite customize its control collection or template. However, you
can use the "Convert to template" menu in the design-view's smartTag. After
converting to the template mode, we can edit the html template of the login
control. e.g: we can add some client-side "onkeypress" event handler code
for the username and password textbox and let the handler programmatically
get the "loginbutton" element and call its "click" method to submit the
login form.

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

Top