> Where can I find a button that can only be submitted only once?
If you mean how to stop a button from being clicked twice, Anthem, the thin
wrapper around Ajax, has exactly this:
http://www.anthemdotnet.com/examples/MoreButtonProperties.aspx via the
EnabledDuringCallBack property.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
--
Arne Garvander
Certified Geek
Professional Data Dude
"Lucid" wrote:
> You could put any button in the Ajax update panel and it will do this. Or
> in the Page_Load you could always throw in a if(Page.IsPostBack( { return; }
> "Arne Garvander" <ArneGa...@discussions.microsoft.com> wrote in message
> news:015F4FF0-5453-4A87...@microsoft.com...
Other options:
- via javascript, attach an ONCLICK event that disables the button once
clicked.
- handle the problem server-side by checking to see if whatever executes on
click was already triggered int he past x seconds.
-Darrel
> You could put any button in the Ajax update panel and it will do this.
How?
> Or in the Page_Load you could always throw in a if(Page.IsPostBack( {
> return; }
How would that stop the page being submitted more than once...?
>> Where can I find a button that can only be submitted only once?
>> Does the Ajax controlkit have such a button ?
>
> Other options:
>
> - via javascript, attach an ONCLICK event that disables the button once
> clicked.
You can't disable a button once the postback has begun and, if you disable
it first, the postback won't actually happen...
[top-posting corrected]
> <script language="javascript">
The language tag has been deprecated for years, and shouldn't be used. The
correct way to begin a client-side JavaScript block is:
<script type="text/javascript">
> function SingleSubmit()
> {
> document.getElementById('Button1').disabled = true;
> return true;
> }
> </script>
> <asp:Button ID="Button1" OnClientClick="return SingleSubmit()"
> runat="server" Text="Button" />
Does this actually work...?
"Mark Rae [MVP]" <ma...@markNOSPAMrae.net> wrote in message
news:%23viNOX7...@TK2MSFTNGP05.phx.gbl...
Hmm...you may be right. I know I've done this before. I think instead of
disabling it, I may have moved it off screen and replaced it with
'submitting form...' text or something.
I'll have to dig through some old code to find it...
-Darrel