viewdata
How to display list of names present in viewdata in asp.net
I have a list of names in viewdata, but am not able to display it in view page <body> <%= ViewData[\"names\"].T开发者_开发百科oString() %>[详细]
2023-03-12 21:15 分类:问答Unpacking Multiple ViewData Results
So I want t开发者_如何学运维o display results from multiple queries from the same controller.[详细]
2023-03-09 13:03 分类:问答View data from view to 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.[详细]
2023-03-05 08:14 分类:问答Using ViewData with join query
Update I now have it working to an extent that the view is populated but my query is wrong so no data is retrieved.[详细]
2023-02-21 03:09 分类:问答How to set ViewBag properties for all Views without using a base class for Controllers?
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.[详细]
2023-02-19 22:54 分类:问答Global data across MVC 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[详细]
2023-02-19 01:49 分类:问答Should ViewData never be used?
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.[详细]
2023-02-05 00:14 分类:问答What's the difference between ViewData and ViewBag?
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[详细]
2023-02-04 19:04 分类:问答ASP.NET MVC ViewData if statement
I use the following in my View to check i开发者_运维技巧f a query exists like domain.com/?query=moo[详细]
2023-02-04 18:55 分类:问答Retain ViewData when editing variable length list
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:[详细]
2023-02-04 14:27 分类:问答