简体   繁体   中英

How to Call JavaScript Function from code behind after Response.Flush() in C# Code

HttpContext.Current.Response.Flush();

ScriptManager.RegisterStartupScript(this, typeof(Page), "Verify", "alert('No Documents Found');", true);

/* By this way I cant call Javascript Function. Please be needful */

Your script is not registered because Response.Flush or Response.End actually END the response life cycle and send the results of that point back to the client browser.

Your RegisterStartupScript has no effect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM