A
Al Cohen
I'm using a LinkButton to call some code, then do a redirect. The code
does some queries, sends some emails, and takes a few moments before the
redirect is performed.
I'd like to disable my LinkButton during this period to prevent multiple
submissions. (Obviously) the disabling should be done at the client
side to prevent any delay. I've tried adding some javascript to
LinkButton.Attributes:
LinkButton1.Attributes.Add("onclick", "this.href='javascript:void(0)'"
+ this.GetPostBackEventReference(this.LinkButton1));
but this doesn't disable the LinkButton. I also tried:
LinkButton1.Attributes.Add("onclick", "this.href='javascript:void(0)'");
which disables the link, but never does the postback.
This seems like a very important thing to be able to do, and thus it
should be reasonably easy - what am I missing?
Alternatively, perhaps there's something clever that I can do on the
server side to "short circuit" subsequent postbacks?
Thanks,
Al Cohen
does some queries, sends some emails, and takes a few moments before the
redirect is performed.
I'd like to disable my LinkButton during this period to prevent multiple
submissions. (Obviously) the disabling should be done at the client
side to prevent any delay. I've tried adding some javascript to
LinkButton.Attributes:
LinkButton1.Attributes.Add("onclick", "this.href='javascript:void(0)'"
+ this.GetPostBackEventReference(this.LinkButton1));
but this doesn't disable the LinkButton. I also tried:
LinkButton1.Attributes.Add("onclick", "this.href='javascript:void(0)'");
which disables the link, but never does the postback.
This seems like a very important thing to be able to do, and thus it
should be reasonably easy - what am I missing?
Alternatively, perhaps there's something clever that I can do on the
server side to "short circuit" subsequent postbacks?
Thanks,
Al Cohen