RE: Button click once
From: Ibrahim Shameeque (IbrahimShameeque_at_discussions.microsoft.com)
Date: 08/23/04
- Next message: John Timney \(Microsoft MVP\): "Re: ASP.Net under Apache"
- Previous message: Mohamed Zaki: "ASP.NET and integrated Authentication"
- In reply to: Jon Booth: "Button click once"
- Next in thread: Jos: "Re: Button click once"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 23 Aug 2004 01:07:01 -0700
Hi
Place button1.enabled = false on the button click event. This will disable
the button after postback, because, the click event is only processed after
postback. Thanks
Ibrahim
"Jon Booth" wrote:
> Hi All,
> I'm trying to create a button that once clicked will disable itself (so as
> not to be clicked twice)
>
> I have the following in my cs
> Button1.Attributes.Add("onClick","return
> document.Form1.Button1.disabled=true;");
>
> It disables the button but does not perform the post back. What am I doing
> wrong?
>
> If I remove the line it posts back fine.
>
> Thanks
> Jon
>
>
>
>
- Next message: John Timney \(Microsoft MVP\): "Re: ASP.Net under Apache"
- Previous message: Mohamed Zaki: "ASP.NET and integrated Authentication"
- In reply to: Jon Booth: "Button click once"
- Next in thread: Jos: "Re: Button click once"
- Messages sorted by: [ date ] [ thread ]