Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Issue with page requiring to click submit button twice with extended custom validator controls.

$
0
0
<div>Hi </div> <div></div> <div>I have extended custom validator using Ajax control toolkit to call web service and perform a business logic validation. I have 5 controls on the form which require server side validation because of complex business logic.</div><div></div> <div>The requirement I have is to post the page, if page is valid and disable submit button to prevent users from clicking it multiple times. </div> <div></div> <div>I have been able to achieve funtionality of disabling the button and submit the form. The issue I have is, if any control + custom validator is a last control on the page and end user do not perform any action on this control to generate an event i.e. enter the value and directly click on submit button, the value of Page_ClientValidate returns as false even though the page is valid, user have to click on the submit again. </div> <div>One reason I found is the on clicking submit button first time, custom validator is not yet validate, hence Page.IsValid set to false and as it is asynchronous call it takes few milliseconds to complete the validation and reset the Page.IsValid to true. Thats why on clicking submit button second time, the page is set to valid and page is posted to the server. </div> <div></div> <div>Is there any way to track these calls in main page on click of a button </div> <div> </div> <div>Regards,</div> <div>RK</div>

Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>