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
65
RegisterStartupScript problem with multiple WARPs on one ascx page
posted

Hi,

I put two WARPs on one ascx page, in one WARP I put a linkbutton there and on sever side button onclick handler I put codes to register a block of script which will get running after the linkbutton onclick event gets fired. But the piece of javascript codes seems cannot get fired anyway. Please see below code snip:

 Page.ClientScript.RegisterStartupScript(this.GetType(), "StartExportKey", "<script language='javascript'> alert('testing'); </script>", true);

 Any suggestion would be high appreciated.

 Mark

Parents
No Data
Reply
  • 24497
    posted

    Hi Mark,

    If you want to execute javascript after async response of warp, then you should register those codes with CallBackManager or add them as a literal control to warp.

    Infragistics.WebUI.Shared.CallBackManager.AddScriptBlock(this, null, "alert('async response');");

    or

    LiteralControl c = new LiteralControl("<script language='javascript'>alert('async response');</script>");
    this.Warp1.Controls.Add(c);

Children
No Data