1. 首页>
  2. 技术文章>
  3. dotnetcore获取参数

dotnetcore获取参数

11/14/17 10:13:38 PM 浏览 1401 评论 0

dotnetcore

在.net core中,如果参数在路由中,可以直接使用:

 ViewContext.RouteData.Values["keyword"]

获取参数值,如果参数是在问号后面,则使用:

Request.QueryString["keyword"]


网友讨论