hi,
i am having a usercontrol in an Aspx page.the user controls contains execute button. click event of the button invokes some email sending action.the user control has check box and a text box validators which has to be valid to make the page post back.when the user clicks twice it is sending 2 emails which it not supposed to. to solve that i have added
RegisterOnSubmitStatement("ServerForm", "if (this.submitted) return false; this.submitted = true; return true;"); in page load event of the aspx page.its not sending 2 mails but it disables my validation.
and i followed another approach by researching forums ,tried to hide actual execute button and create anothe html button and on clicking that i try to invoke the original button and disable the html button but i coudn't fire the click event of the original button. is there any other ways to solve this. or i am missing some thing. plz help
Thanks,
Ranne.
Loading
Anwar BuchooPosted Jun 23, 2006, 3:53 AM
Try keeping a flag somewhere in a cookie or memory [dpending upon the scope ofcourse] which tells if user has already send the mail.. and you can use that information to simply change the appaerance of the form or disabling buttons and controls on that form.
[~Luckyhuss]