Browse by Tags

Related Posts

  • Passing collections as parameters from view to controller and via RedirectToAction

    I'm implementing the following scenario: There is view with a catalogue of items (like products) and a filter for them. Filter is a list of checkboxes and each of the checkboxes represents one category for an item. The number of categories is not fixed. In my controller I get all the date for the...
    Posted to ASP.NET MVC (Forum) by SergID on 04-23-2009, 12:00 AM
    Filed under: MVC, RedirectToAction, view, Collection, Controller
  • Why isn't UpdateModel virtual?

    I've heard Phil on a podcast say 'traditionally people make things non-virtual unless theres a good reason not to, but we decided to make things virtual unless theres a good reason not to'... Therefore you tell me why all the Controller.UpdateModel methods are non-virtual ? Is there a legitimate...
    Posted to ASP.NET MVC (Forum) by simeyla on 02-09-2009, 12:00 AM
    Filed under: UpdateModel, virtual, Controller
  • Re: MVC Controller and URL logic?

    Holy crapoly! I thought MVC would make my life easier! :D Simpler answer: I overload my controller's constructor to accept a URL and use the HttpContext's HttpRequest URL in the default constructor? Better simpler answer: I create a custom "MyController" base class with the overloaded...
    Posted to ASP.NET MVC (Forum) by ericis_com on 12-30-2008, 12:00 AM
    Filed under: MVC, Controller, httpcontext, mock
  • MVC + Unity Containers + MSTest?

    How can I expose Unity to my MVC contollers for unit testing? I quickly found resources for exposing Unity to MVC through a Controller Factory in a custom HttpApplication Start event. But, unit tests usually create and call Controllers directly, so... I suppose I could create a custom Controller class...
    Posted to ASP.NET MVC (Forum) by ericis_com on 12-30-2008, 12:00 AM
    Filed under: mstest, MVC, Controller, controllerfactory, unity, Unit Test
  • How to redirect to another controller based on a wildcard

    Hi there! I have a problem which I'm sure should be fairly simple. I have several routes which catch various different types of urls that contain different structures, but they correspond to other urls which can be found inside the routescollection. routes.MapRoute( "Product" , "products...
    Posted to ASP.NET MVC (Forum) by Dan Atkinson on 10-17-2008, 12:00 AM
    Filed under: Redirect, route, aspnetmvc, Controller, wildcard
  • MVC web site design questions

    I'm learning ASP.NET MVC (I mostly understand how it works), but I have a few questions about designing/organization your web sites. 1. When should you create a new controller and when should you just add a new action? In the download, there's a HomeController that has Home, Contact, and About...
    Posted to ASP.NET MVC (Forum) by jamesewelch on 08-06-2008, 12:00 AM
    Filed under: model, MVC, view, ASP.NET MVC, Controller, asp.net
  • LinkBuilder in Controller

    Hi, I want to use LinkBuilder in my Controller derived class but there is no other way insted of creating new ViewContext. Why I need to use LinkBuilder? Because the output from Controller is XML (my own XmlResult) and inside Xml I need to use Urls from my Routing. For example the RSS feed created using...
    Posted to ASP.NET MVC (Forum) by jirava.net on 07-07-2008, 12:00 AM
    Filed under: mvc routing, routing, ASP.NET MVC, Controller, linkbuilder
  • strange behivour with routing

    there is strange behviur with routing , i do not know that am i doing wrong and what i am doing wrong i am calling a action in a controller when i call it with id it works but when i try to call it without id it do not work origanlly my global file was like this routes.MapRoute( "Default" ...
    Posted to ASP.NET MVC (Forum) by Ahtesham on 07-05-2008, 12:00 AM
    Filed under: MVC, previev 3, routing, Controller, action
  • Re: One Strongly Typed ViewData to rule them all?

    Yes so the viewdata class would be somthing like this (which just uses my types generated by SubSonic): 1 Public Class SharedViewData 2 3 Public CategoryList As List(Of SubSonic.DB.Category) 4 Public Category As SubSonic.DB.Category 5 Public ProductList As List(Of SubSonic.DB.Product) 6 Public Product...
    Posted to ASP.NET MVC (Forum) by alivemedia on 05-20-2008, 12:00 AM
    Filed under: MVC, viewdata, Controller
  • ViewData in a Master Page

    Hi, In the Master Page for my site, I want to display a menu based on records in my database. Simple enough concept, but i'm not sure of where to create and pass in the viewdata to the Master Page. With a regular Page View the data would be created in the controller, but do Master Pages have their...
    Posted to ASP.NET MVC (Forum) by marcusjw on 05-19-2008, 12:00 AM
    Filed under: viewdata, Controller, Master Pages
Page 1 of 3 (28 items) 1 2 3 Next >