简体   繁体   中英

asp.net mvc renderaction

I call the above line in my asp.net mvc view. How do i retrieve the dictionary values from the test controller?

您可以使用ViewData传递信息,例如ViewData [“ MyDictionary”] = myDictionary;。

You can't. The point of RenderAction is to let the controller you're calling do what it normally would without you worrying about what's happening. Maybe a partial view might be better suited for you in your case, it's hard to say without seeing the big picture...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM