Need a simple CRM and Project Management system?
Check out JobNimbus - CRM for Contractors and Service Professionals.

Reply to comment

Preventing of the multiple clicking of Submit button

Problem:
To prevent multiple submits.

Note.
After Submit button is clicked the client side code and server side code is executed in following sequence:
a) Client side event OnClientClick (and javascript function calling), and then OnClick event which performs Post Back.
b) Server side method Page_Load(...), and then method btnSubmit_Click(...).
It is normally.
If javascript function sets btnSubmit.disabled=true; then the event handler btnSubmit_Click(...) on the server side is not being evoked. The reason is: disabled button cannot be clicked.

Solution.
Change the sequence of performing operations on the client side:
At first do postback when button is not disabled.
And then disable the button. Button will remain disabled till page is rerendered.

It can be done this way:

...

OnClick="btnSubmit_Click"
OnClientClick = "btnSubmitClicked(this)"
Text= ...
...

Reply