viewdata Questions
4
Solved
When a user log in into my application i want to show his name throughout the whole application. I am using the asp.net MVC framework. But what i don't want is that is have to put in every controll...
Photostat asked 17/4, 2009 at 8:27
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
//CHECK IF WE SHOULD SHOW THE PASSWORD HINT OR NOT
Setting passwordhints;
using (var db = new dbDataContext())
{
passwordhints = (from c in db.Settings
where c.Name == "ShowPasswordHints" &&...
Ravenna asked 6/12, 2010 at 20:52
2
Solved
I have a problem with an MVC view that I just cannot seem to solve. Here it is.
1) I have an index view that displays a list of retailers with data from the retailers table. So far so good.
2) I ...
Wastage asked 30/11, 2010 at 21:40
1
Solved
When should I use one versus the other? I want to cache a certain object on startup and reuse around the application. Which sounds like the better solution (ViewData or Session)?
Irrepressible asked 7/11, 2010 at 2:20
1
Solved
I've been reading Scott Guthrie's post on Passing ViewData from Controllers to Views, but I don't think the lesson is clicking for my specific situation.
(Note: Due to client proprietary restricti...
Nevins asked 22/9, 2010 at 14:41
1
Solved
I'm having trouble when handling the Post request for my controller:
[HttpGet]
public ActionResult Crear()
{
CarreraRepository carreraRepository = new CarreraRepository();
var carreras = carrera...
Sere asked 5/9, 2010 at 23:39
4
Solved
Assuming you wanted to develop your Controllers so that you use a ViewModel to contain data for the Views you render, should all data be contained within the ViewModel? What conditions would it be ...
Reddin asked 6/8, 2010 at 11:4
1
Solved
I'm trying to pass Json to my View using ViewData
Controller
ViewData("JsonRegionList") = Json(RegionService.GetActiveRegions())
view
$("input#UserRegion").autocomplete({
source:"<%: View...
Tonguing asked 26/7, 2010 at 2:9
1
Solved
When is it appropriate to store data in HttpContext.Current.Items[...] vs storing data in ViewData[...]?
I'm trying to figure out the best practices for storing data in this collection and I'm not...
Ellis asked 6/4, 2010 at 18:44
2
Solved
I have an ASP.NET MVC application with quite a few drop-down lists and multi-select lists. Essentially, a lot of lists of options.
My question is; is it better to pass these lists to the view as p...
Logistic asked 26/2, 2010 at 15:30
6
Solved
I'm trying to pass ViewData to my asp.net mvc masterpage for an mvc usercontrol that I keep on a masterpage. For example, I created a dropdownlist of names as an mvc usercontrol and I put that in m...
Kibitka asked 31/3, 2009 at 7:27
2
Solved
I add that to my header <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> and am able to access ViewData and all its internals as well a...
Quadrille asked 5/3, 2009 at 14:40
4
Solved
I've been nesting my viewdata classes inside my controllers and, as their numbers grow, I'm starting to ask myself if this is a good idea. Then again, something about polluting the /Views and /Cont...
Wallywalnut asked 4/3, 2009 at 21:38
3
Solved
When Jeremy & Chad posted about their FubuMvc project, one of the differentiators they mentioned was their "Thunderdome Principal":
The “Thunderdome Principle” – All
Controller methods take...
Hypotonic asked 5/2, 2009 at 22:44
4
Solved
I am trying to find out how to use usercontrols in asp.net mvc. I know how to add a usercontrol to a view and how to pass data to it. What I haven't been able to figure out is how do you do this wi...
Delft asked 29/11, 2008 at 1:10
4
Solved
Hi im new to MVC and I've fished around with no luck on how to build MVC User Controls that have ViewData returned to them. I was hoping someone would post a step by step solution on how to approac...
Poore asked 1/10, 2008 at 13:35
2
Solved
When a controller renders a view based on a model you can get the properties from the ViewData collection using the indexer (ie. ViewData["Property"]). However, I have a shared user control that I ...
Decile asked 20/8, 2008 at 20:46
© 2022 - 2024 — McMap. All rights reserved.