.NET从后台获取前台数据的方法

1、 Request .QueryString[“”] :是取得get方法传过来的值
2、Request.Form[“txt”] :取得通过post方法传过来的值
3、Request.Params[“txt”] :get,post方法传过来的值都可以取到
4、Request.Params.GetValues(“txt_votes”); 取到某name值,以数组形式。
5、以mvc形式传递过来的参数
Request.RequestContext.RouteData.Values[“id”].ToString();

猜你喜欢

转载自blog.csdn.net/qq_31729917/article/details/80469783