after the click event u can put ,
button1.Enabled = false ,
Main Topics
Browse All Topicshi,
i have a .net button, which is used to redirect the page once it is clicked. in order to avoid multiple click before redirection, i would like to disable the button after the first click. in another word, i would only allow the user to click the button once
how to do that?
thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
hi, guys,
i solved it. you can simply add a javascript function to OnClientClick event of the button:
1. create a hidden textbox to record how many times the user clicks the button
2. in your javascript function, you get the number from the hidden textbox. if num >1, return false; else return true.
therefore, the button_click event won't be fired if num > 1.
thanks guys
Sorry, viola123!
I forgot one important thing in my first post. Must to specify UseSubmitBehavior="False" in aspx. Take a look at following:
aspx:
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" UseSubmitBehavior="False" />
</div>
</form>
codebehind:
protected void Page_Load(object sender, EventArgs e)
{
Button1.Attributes["onclic
}
rotected void Button1_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sl
Response.Redirect("http://
}
Business Accounts
Answer for Membership
by: igor_alphaPosted on 2007-02-13 at 22:39:38ID: 18529081
Hi, viola123
k"] = "javascript:document.getEl ementById( '"+Button1 .ClientID+ "').disabl ed = true;";
You can just add javascript to onclick button attribute on Page_load event.
So on client side, after first click button would be disabled.
aspx:
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" /></div>
</form>
cs:
protected void Page_Load(object sender, EventArgs e)
{
Button1.Attributes["onclic
}