1
Vote

Validation issue

description

Hi,
I've noted, that if there are standard validation controls inside of the control, loaded by PartialUpdatePanel, validators are raised during async postback (initial loading caused by async postback). Everything works fine if loading is serverside, but if it's clientside and async postback is needed, then validators are raised when control is loading for the first time.

comments

grown wrote Oct 1, 2008 at 4:05 PM

I've already identified a root of the problem:

Validate method of Validate id raised from RaisePostBackEvent method of the Page class. It raises Validate if there is nothing in "__EVENTTARGET" POST parameter or parameter is empty. Simply changing _createRequestBody method in PartialUpdatePanel.js:
Snipet:
if(eventTarget != null)
requestBody += "&__EVENTTARGET=" + eventTarget;

To:
if(eventTarget != null)
requestBody += "&__EVENTTARGET=" + eventTarget;
else
requestBody += "&__EVENTTARGET=
";

fixes the problem. Please confirm the fix is ok or you have better solution.

wrote Feb 13, 2013 at 9:49 PM