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
  • 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
  • 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
  • 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
  • Routing problem...doesnt work

    Hello friends! What is wrong if my code? Global.asax.cs 1 public class GlobalApplication : System.Web.HttpApplication 2 { 3 public static void RegisterRoutes(RouteCollection routes) 4 { 5 // Note: Change the URL to "{controller}.mvc/{action}/{id}" to enable 6 // automatic support on IIS6 and...
    Posted to ASP.NET MVC (Forum) by andrebtoda on 05-13-2008, 12:00 AM
    Filed under: MVC, route, routing, Controller
  • Couple of n00b Questions

    I'm just beginning ASP.NET, and getting very comfortable with the MVC stuff, thanks to my PHP/Rails MVC background. Excuse me if these are simple questions, but I've been banging my head against them all day, so would appreciate some guidance.: Question 1: I have an action which saves a form...
    Posted to ASP.NET MVC (Forum) by chrismcabz on 04-10-2008, 12:00 AM
    Filed under: MVC, C#, Controller, Linq
  • Controller for ViewMasterPage

    Hi, I'd like to know the proper way to pass model data to the master page as I was this close (holding up fingers) to touching the model in my OnLoad. Basically I want to store data in the header in my model and then set it during rendering of the master page. Is there a controller associated with...
    Posted to ASP.NET MVC (Forum) by jakenuts on 12-18-2007, 12:00 AM
    Filed under: MVC, Controller, Master Pages
  • Route to a single controller action

    How do I create a rule for all URLs to a specific View folder to go to the same controller action ... ? For example any URL that ends in ~/Sections/ should go to ~/Sections/Index. I've tried the following to no avail:- routes.MapRoute( "Sections", // Route name "Sections/*", ...
    Posted to ASP.NET MVC (Forum) by cranialsurge on 10-01-2009, 12:00 AM
    Filed under: ASP.NET MVC, MVC, Controller, action controllers, routetes
Page 1 of 2 (12 items) 1 2 Next >