Need a simple CRM and Project Management system?
Check out JobNimbus - CRM for Contractors and Service Professionals.
Check out JobNimbus - CRM for Contractors and Service Professionals.
Popular Articles
Last viewed:
- C# Download File with Progress Bar
- Fixing Relative Paths in C# ASP.NET When Using Url Rewriting
- Compare SQL Databases
- Office 2007 Change Default Document Save Type
- Performance benchmarks for LINQ vs. SqlDataReader, DataSet - LINQ Compiled Queries: Part 2
- Microsoft Word Spell Checker Doesn't Check Cut and Pasted Text
Recent comments
- thank you for sharing
1 day 18 min ago - Great explanation and more questions
2 days 3 hours ago - Insertion of illegal Element:
4 weeks 4 days ago - Insertion of illegal Element: 32
4 weeks 4 days ago - re "But, this will NOT work."
5 weeks 5 days ago - Unable to cast COM object of t
5 weeks 5 days ago - Saved my life
5 weeks 6 days ago - nice
8 weeks 5 days ago - good article
9 weeks 6 days ago - windows 2008 server backups
11 weeks 5 days ago

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:
...
OnClientClick = "btnSubmitClicked(this)"
Text= ...
...