如何使用超链接asp.net C#将请求查询字符串传递给onther页面 [英] how to pass request querystring to onther page using hyperlink asp.net C#
本文介绍了如何使用超链接asp.net C#将请求查询字符串传递给onther页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个页面作为asp.net这个页面请求查询字符串。
i希望将此查询字符串传递到其他页面
请任何一个帮助
i have page as asp.net this page request query string .
i want to pass this query string to onther page
please any one helpme
推荐答案
试试这些,< br $> b $ b
Try these,
private void btnSubmit_Click(object sender, System.EventArgs e)
{
Response.Redirect("Webform2.aspx?Name=" +
this.txtName.Text + "&LastName=" +
this.txtLastName.Text);
}
在Webform2.aspx页面中。在它的加载事件中,
And in "Webform2.aspx" page.In it's load event,
private void Page_Load(object sender, System.EventArgs e)
{
this.txtBox1.Text = Request.QueryString["Name"];
this.txtBox2.Text = Request.QueryString["LastName"];
}
试试这个!
Try this !
asp:HyperLink runat="server" ID="fpassord1" Text="Forgot Password ?" CssClass="MenuText"/asp:HyperLink>
fpassord1 .Attributes [onclick] =javascript:return window.open('getPassword.aspx?username = test+& download = no',titlebar = 0,toolbar = 0,width = 250,height = 250) ;
fpassord1.Attributes["onclick"] = "javascript:return window.open('getPassword.aspx?username=test" + "&download=no',titlebar=0,toolbar=0,width=250,height=250)";
CodeProject常见问题系列1:ASP.NET GridView [ ^ ]可以帮助你。
这篇关于如何使用超链接asp.net C#将请求查询字符串传递给onther页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文