当前位置:编程学习 > C#/ASP.NET >>

如何给top.location.href带参数?

如何给username带参数? 
string username = reader["username"].ToString();
this.Response.Write("<script>top.location.href='three.aspx?username='; </script>");  --------------------编程问答-------------------- 用username=<%=username%> --------------------编程问答--------------------

this.Response.Write(string.Format("<script>top.location.href='three.aspx?username={0}'; </script>",'参数名称变量'));  

--------------------编程问答--------------------

Response.Redirect("three.aspx?username="+reader["username"].ToString()); 
--------------------编程问答--------------------

 string strValue = "abcd";
 Response.Write("<script>top.location.href='Test2.aspx?username="+ strValue +"'</script>"); 
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,