开发者

MVC actionlink parameter access from resulting view

I have my URL /Admin/EditUser/18094c7d-4013-4723-81d2-0f2a8开发者_StackOverflow中文版63341db?pwchange=True which is got my passing parameters via an action link new { id = ID, pwchange = true} . How do i access the pwchange from the view?

I can do this in other web languages such as PHP with a simple _GET, in MVC however, i can't seem to find an option


You could do something like this in your controller -

var pwchange = Request.QueryString["pwchange"].ToString(); 

Then pass your value to the view via a view object or in the ViewBag

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜