viewbag Questions

5

Solved

Suppose you have a list of People A and a list of People B in a page. And these two are seperate classes in L2S, representing two different tables. Therefore, you cannot pass a single model as foll...
Rudich asked 8/7, 2011 at 14:23

1

Solved

I have an action filter that is responsible for placing some common information into the ViewBag for use by all views in the shared _Layout.cshtml file. public class ProductInfoFilterAttribute : A...
Coatee asked 6/7, 2011 at 20:37

1

Solved

Here's the thing. I have a MVC Action, and on that action, I have applied a custom ActionFilterAttribute to get the deserialization working. Now, what I want to do, is set some header based on the ...
Pyorrhea asked 2/6, 2011 at 15:22

2

Solved

How can I store a value in the ViewBag accessing it from javascript?
Cohin asked 31/5, 2011 at 20:8

2

Solved

I'm working on a CSS framework that I can drop in to other projects as a NuGet package. To keep things clean, the entire framework - views, styles, images, and master pages / layout pages - is act...
Tui asked 16/5, 2011 at 21:19

4

Solved

Just came across an interesting effect while debugging a View. The scenario is easy to reproduce - I have a breakpoint in a View, in the Watch window I add ViewBag.ViewData and the value is null. H...
Country asked 28/4, 2011 at 12:6

2

Solved

I'm trying out MVC Scaffolding in a VB.NET MVC3 project and running into an issue with late binding with Option Strict set on (and I want it on). This works in C#: public ActionResult Create() { ...
Jana asked 18/2, 2011 at 14:36

2

Solved

I know that ViewData and ViewBag both use the same backing data and that neither are as good as using strongly typed models in most cases. However when choosing between the two is the dynamic natur...
Scheming asked 22/2, 2011 at 13:52

1

Solved

It seem like mvc 3 team decided to bring in a feature for dynamic data exchange between a controller and a view called the viewbag but it is A good thing against the strongly typed view we al...
Iconic asked 22/1, 2011 at 3:50

© 2022 - 2024 — McMap. All rights reserved.