日期:2014-05-18  浏览次数:20437 次

传值并跳转
C# code

if(!Page.IsPostBack)
            {
                this.txtsid.Text=Request.QueryString["sid"];
                this.txtsname.Text=Request.QueryString["sname"];
            }
        }



C# code

[color=#FF0000]string url="addsoftwareupgrade.aspx?sid=" + txtsid.Text + "&sname=" + txtsname.Text ; 
                Response.Redirect(url);[/color]                Response.Write("<script>if(confirm('此软件没有升级记录,是否添加?')){window.location.href='addsoftwareupgrade.aspx'};</script>");


怎么把url写在href里面啊。我弄了半天没弄出来,应该是符号的问题吧。

------解决方案--------------------
string url="addsoftwareupgrade.aspx?sid=" + txtsid.Text + "&sname=" + txtsname.Text ; 
Response.Write("<script>if(confirm('此软件没有升级记录,是否添加?')){window.location.href='"+url+"'};</script>");