如何在以下代码中使用查询字符串? [英] How to use querystring in following code?

查看:82
本文介绍了如何在以下代码中使用查询字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

firstpage.aspx:



Response.Redirect(branch?uid =+ DUserName);



secondpage.aspx:



uname = Request.QueryString [0];





global.asax.cs:



firstpage.aspx :

Response.Redirect("branch?uid="+DUserName);

secondpage.aspx :

uname = Request.QueryString[0];


global.asax.cs :

void Application_Start(object sender, EventArgs e)
      {
          RoutingData(RouteTable.Routes);
      }

      private void RoutingData(RouteCollection routecollection)
      {
          routecollection.MapPageRoute("Student", "Student/Profile", "~/View/StudentProfile.aspx");



}



我有使用global.asax.cs重定向到另一个页面。请告诉我如何使用查询字符串?


}

I have used global.asax.cs to redirect to the another page. Please tell me how can I use query string?

推荐答案

Request.QueryString [uid];



我希望这会对你有所帮助
Request.QueryString["uid"];

I Hope this will help you


在你想要访问查询激动值的下一页上使用它....

Request.QueryString [ UId];





谢谢
Use this on the next page where you want to access the query stirng value....
Request.QueryString["UId"];


thanks


这篇关于如何在以下代码中使用查询字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆