views:

166

answers:

2

<%Html.RenderAction("Index", "Test", New With {.pagetmp = "test"})%>

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

A: 

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

Rick
+1  A: 

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

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