Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Invoking ClientSide functions from controls within WARP.
posted

Hi,

I have a WebAsynchronousRefreshPanel and few controls(Button Controls) within it.

I have few controls outside WARP as well.

Have used WARP in order to prevent refreshing the entire Page.

In case of any errors/Exceptions at the server side, A client side function is invoked to display exception.

Following is the Server side code to invoke client side exception:

ScriptManager.RegisterClientScriptBlock(Page, GetType(), "CLOSE_SCRIPT", "DisplayAlertBox('" + Message + "');", true);

And this is the Client side code to display the Message in form of Alert Box:

function DisplayAlertBox(arg1)

{

alert(arg1);

}

 

But there is a problem displaying exception incase of exception from a control inside WAPR.The error/exceptions are not getting displayed on to the Client side.It works fine for controls outside WARP.

As displaying error is a must for any controls.. I dont know how to go about this. The controls needs to be inside WARP at any cost.

Any suggestions would be valuable.

Thanks In Advance.

 

 

 

Parents
No Data
Reply
  • 24497
    posted

    Hi,

    Within async postback of WARP or WebTab, you can not use standard Register... methods. To pass script to client you may add to WARP a literal control with your javascript statements use Infragistics.WebUI.Shared.CallBackManager.AddScriptBlock(..) with your scipt. You also may process ClientSideEvents.Error events of WARP.

    Note: if there is a global server error while async postback of WARP, then full postback will be triggered. Besides client error processing, you may process those global errors on server using Infragistics.WebUI.Shared.CallBackManager.AddErrorHandler(...)

Children