?
Solved

Default button no longer default after disable then enable

Posted on 2011-03-02
3
Medium Priority
?
290 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 2000 total points
ID: 35022870
In the form tag you can just set the default:

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

0
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35024952
on page load write:-

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

Open in new window


where Button1 is the ID of Defautl Button.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
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…
Suggested Courses
Course of the Month17 days, 7 hours left to enroll

831 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