function
onExpand(sender, eventArgs)
{
//Use sender (instance of CollapsiblePanerExtender client Behavior)
//to get ExpandControlID.
alert("Now Refresh to get new data");
var expander = $get(sender.get_ExpandControlID());
//var expander = $get(sender.get_TargetControlID());
//Get bounds of the expand control, will be used to set position of progess indicator.
var bounds = Sys.UI.DomElement.getBounds(expander);
//Progress Indicator element
var progress = $get('progress');
//Set Position & visibility of Pogress Indicator
//Sys.UI.DomElement.setLocation(progress,bounds.x+bounds.width,bounds.y);
//progress.style.visibility = 'visible';
//Using RegEx to replace pnlCustomer with hdnCustId.
//hdnCustId is a hidden field located within pnlCustomer.
//pnlCustomer is a Panel, and Panels are not Naming Container.
//So hdnCustId will have the same ID as pnlCustomer but with
//'hdnCustId' at the end insted of pnlCustomer.
var mediclaimClaimId = $get(sender.get_ExpandControlID().replace(/pnlMediclaimClaim/g,'hdnMediclaimClaimId')).value;
//pnlMediclaimClaimDetailCtl = $get(sender.get_ExpandControlID().replace(/pnlMediclaimClaim/g,'pnlMediclaimClaimDetail')).id;
//Issue AJAX call to PageMethod, and send sender object as userContext Parameter.\
var reqviaproxy = MediclaimClaimService.GetMediclaimClaimDetails(mediclaimClaimId, OnSucceeded, OnFailed);
}
// Callback function invoked on successful
// completion of the page method.
function OnSucceeded(result, userContext, methodName)
{
$get(
'progress').style.visibility = 'hidden';
//userContext is sent while issue AJAX call
/
/it is an instance of CollapsiblePanelExtender client Behavior.
/
/Used to get the collapsible element and sent its innerHTML
//to the returned result.
//userContext.get_element().innerHTML = result;
$get(pnlMediclaimClaimDetailCtl).innerHTML = result; ////////////// this is the problem area
///////////// giving the "view state corrupt" problem
}
/
/ Callback function invoked on failure
// of the page method.
function OnFailed(error, userContext, methodName)
{
$get(
'progress').style.visibility = 'hidden';
alert(error.get_message());
}
pls help