Solved

Default button no longer default after disable then enable

Posted on 2011-03-02
3
280 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:Russ Suter
3 Comments
 
LVL 9

Accepted Solution

by:
rawinnlnx9 earned 500 total points
Comment Utility
In the form tag you can just set the default:

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

0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
0
 
LVL 9

Expert Comment

by:mayank_joshi
Comment Utility
on page load write:-

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

Open in new window


where Button1 is the ID of Defautl Button.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now