asp.net mvc - MVC3 ViewBag not working -


In my action controller, I am setting the following:

  ViewBag.headerinfo = " Ddddddddddddddd "; ViewBag.info = "abc";   

I have this in my _Layout view:

  & lt; Div id = "header_infobox" & gt; @ Vubug.Info BBBBB @ Vubuag.Hadrin fo   

When I look at everyone, BBBBB happens. I do not understand why viewbags do not work, I hope someone can give me advice

thanks,

Melissa < P>

I have the same trouble. For me, this was because I was just returning the redirect tie instead of returning the scene. When you redirection tiections, this apparently clears the ViewBag.

Comments