c# - asp.net MVC RC1 RenderPartial ViewDataDictionary -


I am trying to pass a ViewData object from a master page ViewDataDictionary

The problem is that the ViewDataDictionary view is not returning any value in the user control, whichever I try it

The sample code below is simply using an anonymous object for prohibition, although neither this method or ViewData object works.

I am trying to use the following RenderPartial helpful method:

  & lt;% html .renderpartial ("/ view / project / Projectscask ", ViewData.Aval (" Projects "), New ViewDataDictionary (New {Test =" Mark "}); & Gt%;  

And in my visual user control, I do the following:

  & lt;% = html.Encode (seeData ["Test"])% & Gt;  

Edit:

I am able to pass

To use and type typed models firmly without any problems. This is the ViewDataDictionary that I am trying to use to pass, just say the same value outside the model ...

You have tried:

   

In addition to this, have you verified Vodata ["Test"] that you are in Verdict before passing it? Also keep in mind that when your passwords are passed in partial control, it is important to keep the model the same.

Nick


Comments