Modalpopup windows appears after the whole function is processed

147 Views Asked by At

I have a modal popup window that I want displayed at the start of the function. Instead, it appears after the function has been processed.

    protected void RadListView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string script = "function f(){$find(\"" + DisclaimerAlertWindow.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);  


// other business logic
}  

How can I get the modalpopup to be displayed when the function is called?

0

There are 0 best solutions below