I have a list of names in viewdata, but am not able to display it in view page <body> <%= ViewData[\"names\"].T开发者_开发百科oString() %>
So I want t开发者_如何学运维o display results from multiple queries from the same controller.
Is there an easy开发者_如何学JAVA way to pass an object from my view to controller? I tried ViewData[\"newPerson\"] but that didn\'t work.
Update I now have it working to an extent that the view is populated but my query is wrong so no data is retrieved.
In the past I\'ve stuck common properties, such as the current user, onto ViewData/ViewBag in a global fashion by having all Controllers inherit from a common base controller.
I have number of action methods in my controller that retrieve data from web services or database. Along them there are other action methods in the same controller that use that data. As I would love
I have tried to check the best practices for using asp.net mvc and quite a few say that we should never use ViewData. I have read this post and it seems like it from that.
I saw the ViewBag in MVC 3. How\'s t开发者_高级运维hat different than ViewData in MVC 2?It uses the C# 4.0 dynamic feature. It achieves the same goal as viewdata and should be avoided in favor of usin
I use the following in my View to check i开发者_运维技巧f a query exists like domain.com/?query=moo
I\'m editing variable length lists and use ViewData to pass around information for filling a DropDownList. I use the method described here for editing these lists: