1

In my company I have a ASP.NET web page where there is a ChangePasswordControl and a RecoveryPassword control. The problem now is that, when user filling out the data hits enter key on the keyboard he get's logged out instead of validating the user.

Normally I've used a Panel control and setup the default button there and this helped. But here the change password button is built in and there is no way to get the ID of it (or is it?). I generally started my web apps adventure with ASP.NET MVC so I do not know much about the ASP.NET Controls.

Could anyone help me? I've read somewhere on the net that I should do my own template?

But I don't know if it's the right approach, and I don't know how to do this templates and what's the idea behind this concept. I'm wondering if I should use some jQuery or Javascript to handle that, but maybe there is a simpler way to do that.

Thanks in advance.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Rafal_Koscinski
  • 317
  • 5
  • 22
  • http://codeverge.com/asp.net.web-forms/how-do-i-set-the-default-button-and-the-foc/399515 – Donal Aug 08 '14 at 10:49
  • aahhh the magic of using the right keywords in google ;) Why didn't I think of typing the default button keyword I don't know ;) Thank you so much, StackovefrlowRocks ;) Ps. If you want plece your answer under my question I will "tick" you :) – Rafal_Koscinski Aug 08 '14 at 11:02
  • ok, thanks - I have posted that answer. – Donal Aug 08 '14 at 11:04

1 Answers1

2

Have a look at the solution outlined here

Donal
  • 31,121
  • 10
  • 63
  • 72