Click here to Skip to main content
16,017,448 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using 'ascx' control with ajax tab

When I click the 'asp:button' or 'selected change' event of drop down or any server control like button, drop down etc, every control posts back twice.

Why its happening?

It should post back 1 time as it usually happens

What could be the issue?

Need Help

No JavaScript or ajax used to submit form
Posted
Updated 1-Mar-11 3:14am
v3
Comments
Dalek Dave 1-Mar-11 6:47am    
Edited for Grammar and Readability.
Manas Bhardwaj 1-Mar-11 6:48am    
it is difficult to say anything without looking your code.

1 solution

If you have a javascript function which does document.formName.submit() and a form that has a submit button when you click on submit the form will be submitted twice. A simple way to avoid that it is to change the type of the submit button from "submit" to "button" then only the javascript function will submit the form.

Good luck!
 
Share this answer
 
Comments
Espen Harlinn 17-Mar-11 10:26am    
Nice reply, my 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900