Reputation: 7667
Inspite of seeing the model by setting breakpoint, I want to dump each and every object inside the ViewModel to its corresponding View in Action method, so that I can see its properties in the browser.
Is there any direct method for doing this in asp.net MVC just like we have in PHP Zend Framework ?
Upvotes: 1
Views: 745
Reputation: 1039298
You could JSON serialize the model in the view:
<pre>
<%= new JavaScriptSerializer().Serialize(Model) %>
</pre>
or use XML format if you prefer.
Upvotes: 3