Wen我完成(成功)新用户注册我想在我的代码后面的新通知页面中更改当前页面。
为此,我使用了javascript:
<script type="text/javascript">
var Tag;
function notifyscript(TagName) {
tag = TagName;
var myTag = document.getElementById(tag);
myTag.click();
}
为了打电话:
<a id="notify" href="http://localhost/Pages/Account/Notification.aspx" target="_parent"/>
但是当我在本地运行时,它会给我一个错误
500 (HTTP Error 500.0 - Internal Server Error
The call fails LoadLibraryEx στο φίλτρο ISAPI "C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll"
当我在网上运行这个什么都不做
有人知道怎么做这个动作吗?
我的意思是当后面的代码结束注册时打开一个新页面。
答案 0 :(得分:2)
请在Code Behind上尝试此代码:
string url="www.google.com";
string msg = "<script type='text/javascript'>" +
" $(document).ready(function(){ " +
" window.location.href='" + url + "';" +
" });" +
"</script>";
page.ClientScript.RegisterStartupScript(page.GetType(), "myURL", msg);