Default button no longer default after disable then enable

My web page has a default button. The button disables itself after a click to prevent duplicate clicks. If the processing fails it enables again to allow a retry but the button no longer behaves like the default button (i.e. I can't press the enter key to activate it) after it has been enabled again. Is there a way to make it the default button again after being re-enabled?
LVL 20
Russ SuterAsked:
Who is Participating?
 
rawinnlnx9Connect With a Mentor Commented:
In the form tag you can just set the default:

<form DefaultFocus ="TextBox1" runat ="server">

0
 
mayank_joshiCommented:
on page load write:-

Page.RegisterHiddenField( "__EVENTTARGET", Button1.ClientID );

Open in new window


where Button1 is the ID of Defautl Button.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.