Posts

Showing posts with the label Asp.net MVC 3

Multi Select List Asp.net MVC 3

full working example: Model: public class Item {     public int Id { get ; set ; }     public string Name { get ; set ; } } public class MyModel {     public IEnumerable SelectedItemIds { get ; set ; }     public IEnumerable < Item > AvailableItems {         get         {             return new []             {                 new Item { Id = 1 , Name = "Item 1" },                 new Item { Id = 2 , Name = "Item 2" },                 new Item { Id = 3 , Name = "Item 3" },             };         }     } } Controller: [ HandleError ] public class HomeController : Controller { ...

Creating a Global Action Filter in asp.net MVC 3 and above

I Found a very nice and simple acticle of incorporating the Global Action filteres on your application. this acticle is as below. http://weblogs.asp.net/gunnarpeipman/archive/2010/08/15/asp-net-mvc-3-global-action-filters.aspx It also contains the source code required to try it out.