Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Avoid multiple post

Status
Not open for further replies.

JCV

Programmer
Mar 14, 2002
33
0
0
AR
Hi,

which is the way of avoid multiple post en asp.net with c# ?

Regards.
JCV
 
What do you mean by avoid mutiple posts? You can limit the amount of post backs by using AJAX.
 
I want to avoid the user has click more than once on the button submit.
 
The user should never have to click more than once to submit. Once a button is pressed, it automatically causes a post back.
 
OK, but if the user click more than once, then the event is fired more than once..., then the SP with the insert clause is executed two or more.
 
If your orginal post was more clear in what you wanted to do, then I could have given you the answer on my first response.

You will have to use javascript to disable the button when the user clicks it. Then, once your process is done, use javascript again to enable the button.
 
My apologies for my poor English.
If i disable the button in the event OnClientClick, then the event OnClick is not fired.
Would you give me an example ?

Regards.
Juan Carlos.
 
you need to do this client side using js. this cannot be done server side. i'm sure there are plenty of examples on line. google "click button once asp.net" or something along those lines.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top