[英]How to Call JavaScript Function from code behind after Response.Flush() in C# Code
HttpContext.Current.Response.Flush(); HttpContext.Current.Response.Flush();
ScriptManager.RegisterStartupScript(this, typeof(Page), "Verify", "alert('No Documents Found');", true); ScriptManager.RegisterStartupScript(this,typeof(Page),“ Verify”,“ alert('No Documents Found');”,true);
/* By this way I cant call Javascript Function. / *通过这种方式,我无法调用Javascript函数。 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. 您的脚本未注册,因为Response.Flush
或Response.End
实际上结束了响应生命周期并将该点的结果发送回客户端浏览器。
Your RegisterStartupScript
has no effect. 您的RegisterStartupScript
无效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.