脚本管理器?在Asp.net中?

脚本管理器?在Asp.net中?,asp.net,Asp.net,在web应用程序中,在重定向到另一个页面之前,我要显示消息!几秒钟后,它重定向到该页面。为此,我在scriptmanager中编写了如下代码 ScriptManager.RegisterStartupScript(this, GetType(), "mess", "<script> window.setTimeout('window.location='http://www.stackoverflow.com'; ',4000) </script>", fals

在web应用程序中,在重定向到另一个页面之前,我要显示消息!几秒钟后,它重定向到该页面。为此,我在scriptmanager中编写了如下代码

     ScriptManager.RegisterStartupScript(this, GetType(), "mess", "<script> window.setTimeout('window.location='http://www.stackoverflow.com'; ',4000) </script>", false);
ScriptManager.RegisterStartupScript(这个,GetType(),“mess”,“window.setTimeout('window.location='s'))http://www.stackoverflow.com“;”,4000)”,假);
但是它不是重定向,你能帮我吗,谢谢。

试试这个,会有用的

ScriptManager.RegisterStartupScript(this, GetType()
            , "mess", "<script> window.setTimeout(\"window.location='http://www.stackoverflow.com'\",4000) </script>", false);
ScriptManager.RegisterStartupScript(这个,GetType()
,“mess”,“window.setTimeout(\”window.location='1http://www.stackoverflow.com“\”,4000)”,假);
注意:自测解决方案

希望它能起作用:

ScriptManager.RegisterStartupScript(此,GetType(),“mess”,“window.setTimeout(\”window.location.href=)http://www.stackoverflowcom“\”,4000)”,假)