Obtain View name in Controller, ASP.NET MVC

前端 未结 4 867
悲&欢浪女
悲&欢浪女 2021-01-25 05:07

I am using asp.net mvc. I have 4 pages that show list of events(different type of events) and \"Details\" link on each page leads to \"EventDescription.aspx\" View.

The

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-25 05:39

    Put the return path in TempData (not ViewData) and it can pass from the calling page to the Details page. See also http://jonkruger.com/blog/2009/04/06/aspnet-mvc-pass-parameters-when-redirecting-from-one-action-to-another/

提交回复
热议问题