Top "Viewbag" questions

ViewBag is a dynamic type object in the ASP.

How can ViewBag data be saved after a form post?

So I have a ViewBag.Something and this data is randomly generated. In my view, I set this to a …

asp.net-mvc asp.net-mvc-3 razor viewbag
ViewBag vs Model, in MVC.NET

This is more of a generic architectural question: I'm trying to decide if it's ok for my programmers to use "…

asp.net-mvc viewbag asp.net-mvc-viewmodel
How do I send assign a List<string> to a JavaScript array or enumerable object

I have the following : ViewBag.SomeEnumerable = new List<string>() { "string1", "string2" }; Now how do I assign ViewBag.SomeEnumerable …

c# javascript asp.net-mvc-3 viewbag
Html.ActionLink value of ViewBag

In ASP MVC C# I putted a List(Cars) in the ViewBag.cars, now I want to make an actionlink …

asp.net-mvc-4 actionlink viewbag
How to put viewbag value as a variable in javascript/ jquery?

I try to put two variable in JQuery which came from viewbags : $("#btnAdd").click(function () { var url = dev + "/Legacy/PutContentInThematic"; …

c# jquery asp.net-mvc model-view-controller viewbag
What is the best way to create dropdownlists in MVC 4?

I want to know,What is a best way to create dropdownlists in MVC 4? With ViewBag or another approach?

asp.net-mvc-4 html.dropdownlistfor html-select viewdata viewbag
Passing strings with Single Qoute from MVC Razor to JavaScript

This seems so simple it's embarrassing. However, the first question is when passing a value from the new ViewBag in …

javascript asp.net-mvc razor viewbag
Access ViewBag in JS file - Asp.net MVC

I have one Viewbag. I have fill that viewbag value from server side in Action result method. I need to …

javascript asp.net-mvc viewbag
ViewModels or ViewBag?

I'm fairly new to MVC4, EF5 and ASP.Net, and I don't seem to be able to find a good …

asp.net-mvc-4 viewmodel viewbag
MVC3 RedirectToAction in a post method and ViewBag suppression

i'm currently working a list of data that i need to display in a view that represent a list and …

c# asp.net-mvc-3 viewbag