Top "Viewbag" questions

ViewBag is a dynamic type object in the ASP.

Passing list from MVC ViewBag to JavaScript

I have a list of users which I pass from my controller to my view using the view bag. Now …

javascript asp.net-mvc-4 viewbag
Cannot apply indexing with [] to an expression of type 'System.Dynamic.DynamicObject'

When I try to assign a value to the ViewBag I get the following error: Cannot apply indexing with [] to …

c# asp.net-mvc viewbag dynamicobject
How to get bool value from ViewBag on view?

I am trying to receive bool values from ViewBag. But the issue is that to receive value I am using: …

c# jquery viewbag
pass model to view using viewbag

i want to send two model in my view and in other page maybe and need more controller ViewBag.Users = …

asp.net-mvc entity-framework viewbag
MVC Passing ViewBag value from another controller

I've set a value into Viewbag.message in my default HomeController and successfully display it in my Shared/_Layout.cshtml. …

asp.net-mvc asp.net-mvc-4 viewbag
ViewBag vs ViewData performance difference in MVC?

I know that ViewData and ViewBag both use the same backing data and that neither are as good as using …

asp.net-mvc performance asp.net-mvc-3 viewdata viewbag
Pass image from controller and display in a view using ViewBag in ASP.NET MVC 3

I guess it's something very straight forward but I can't find out how to do it. In my controller I …

asp.net-mvc-3 viewbag
how to pass data from View to Controller using ajax get or post in mvc with parameters

I am trying to pass data from View to Controller Action Method using ajax as follows:- I have Membership …

asp.net-mvc jquery parameter-passing viewbag asp.net-mvc-views
Access a Viewbag like an Array?

Imagine a view bag called ViewBag.Modes this contains the following: Simple Advanced Manual Complete How can I access the …

html asp.net-mvc razor viewbag
Create ViewBag properties based on strings

Is there any way to create and use dynamic properties for ViewBag, based on strings? Something like ViewBag.CreateProperty("MyProperty"); …

asp.net-mvc-3 viewbag