提示未登录,点确认,跳到登陆页

1、

ClientScript.RegisterClientScriptBlock(GetType(), "", "<script>alert('你还没有登录!');window.location='login.aspx'</script& gt;");

2、

 ClientScript.RegisterStartupScript(this.GetType(), "myscript", "<script type='text/javascript'>alert('你还没有登录!');</script>");

 

跳转到根目录,用下面的语句:

string scriptStr = "javascript:top.location='Login.aspx'";
        this.ClientScript.RegisterStartupScript(this.GetType(), "exit", scriptStr, true);

posted on 2013-08-28 17:00  御不凡  阅读(192)  评论(0编辑  收藏  举报