mvc:Request.QueryString[ "xx" ]无法获取值??
mvc项目里一个control,是Home
home里有两个action,一个是a,一个是b。
也分别对应两个view
——————————————————————————————————————
在a页面,a页面没有form,没有使用form的get或post提交。我是这么提交的:
js里直接写页面的跳转
window.location.href = "/Home/b/kw=aaa&fc=bbb"; //三个方法都不行window.location.href = "/Home/b?kw=aaa&fc=bbb";window.location.href = "/Home/b/?kw=aaa&fc=bbb";
var keyWord = this.Request.QueryString[ "kw" ];//fc也不行
routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "RenCai", action = "Default", id = UrlParameter.Optional } // Parameter defaults );