我有类似的方法
UrlHelper.Action("login", "Authentication", HttpContext.Current.Request.Url.Scheme);
Run Code Online (Sandbox Code Playgroud)
我想传递查询字符串参数,如“referrer?” = pageName 到这个方法。我该怎么做?
您只需像这样声明您的参数:
UrlHelper.Action("login", "Authentication", new { referrer = "Page Name" })
Run Code Online (Sandbox Code Playgroud)
然后在你的Action中获取参数:
Request.Params["referrer"]
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5254 次 |
最近记录: |