|
Rank: Newbie Groups: Member
Joined: 12/25/2008 Posts: 8
|
Hi,
I have a toolbar with 2 button, one for saving and the other one to go back. The page use control validation. If I set the toolbar CauseValidation to true the back button doesn't work because the page validation failed, if I set the toolbar CauseValidation to true then the back button work but the save is posted to the server without validation. So I have try to create a client item click event handler that set Page_ValidationActive to false if the back button is clicked but the page is still validating preventing the post back to the server. So I try to do the validation in the event handler if the save button is clicked and disable the CauseValidation on the toolbar but calling Page_IsValid in the event handler doesn't trigger page validation and returning false doesn't cancel the post back.
Any suggestion on how to work around this issue?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
I believe you can set Page_ClientValidate instead of Page_ValidationActive to false in your code to prevent page validation on the client side thus allow the page to post back.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/25/2008 Posts: 8
|
I believe Page_ClientValidate is for validating the page, it not a property it a method. While I was debugging the code I found that the toolbar event seam to call the Page_ClientValidate manually if the CauseValidation is enable on the toolbar. The only alternative I was able to find was to do the page redirect in the client item click event handler bypassing the server event.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
You are correct. We have posted a new build that now checks Page_ValidationActive. You can download the new build from our download page. This build should work with your original code.
Thanks!
|
|