0

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

1
  • What is the output of the action? JSON? View? Commented Jun 4, 2009 at 20:22

2 Answers 2

1

You can pass information using ViewData e.g. ViewData["MyDictionary"] = myDictionary;

Sign up to request clarification or add additional context in comments.

Comments

1

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...

1 Comment

I am creating a cms with mvc. My objective is to have small controls that retrieve a value like page name and return text that is stored in a database. I don't want to use partial views because i would need to write all the code in the master controller. I like to have the controls retrieve thier own data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.