Home / ASP.NET Weblogs
All Tags » ASP.NET » code » MVC » Tips (RSS)

Browse by Tags

Related Posts

  • A UrlHelper Extension For Creating Absolute Action Paths in ASP.NET MVC

    ASP.NET MVC comes with a UrlHelper class in the System.Web.Mvc.Controller.Url namespace, which you can access through the Url property of any controller.  This provides some handy methods to get the url of an action or route, among other things.  For example, Url.Action(“About”, “Home”) will...
    Posted to Scott's Blog (Weblog) by srkirkland on 09-17-2009, 12:00 AM
    Filed under: Code, Tips, ASP.NET, ASP.NET MVC, MVC
  • Inserting Transactions into Telerik’s ASP.NET MVC Grid

            Telerik recently released their Extensions for ASP.NET MVC which include several great controls, the most immediately useful of which is their Grid control.  In the simple (and probably most common) cases the grid works by passing taking an enumerable list of...
    Posted to Scott's Blog (Weblog) by srkirkland on 11-10-2009, 12:00 AM
    Filed under: Code, Tips, ASP.NET, NHibernate, ASP.NET MVC, MVC, Telerik
  • Making ASP.NET MVC Actions be Transactional By Default

    In an earlier post I talked about writing a Transaction attribute for MVC using NHibernate (though it isn’t really NHibernate specific).  The basic idea is that when an action marked with [Transaction] is executing (OnActionExecuting) you begin a transaction, and some time later (I use OnActionExecuted...
    Posted to Scott's Blog (Weblog) by srkirkland on 11-16-2009, 12:00 AM
    Filed under: Code, Tips, ASP.NET, NHibernate, ASP.NET MVC, MVC
  • Authorizing Access via Attributes in ASP.NET MVC Without Magic Strings

    Recently I developed a strategy which I think works well for authorizing access to user groups (Roles) without using the string names of those groups. The problem I am trying to avoid is doing something like [Authorize(Roles=”AdminRole”)] on a controller or action since I know the role names can change...
    Posted to Scott's Blog (Weblog) by srkirkland on 01-04-2010, 12:00 AM
    Filed under: ASP.NET, ASP.NET MVC, Code, MVC, Tips
  • Introducing Data Annotations Extensions

    Validation of user input is integral to building a modern web application, and ASP.NET MVC offers us a way to enforce business rules on both the client and server using Model Validation.  The recent release of ASP.NET MVC 3 has improved these offerings on the client side by introducing an unobtrusive...
    Posted to Scott's Blog (Weblog) by srkirkland on 02-23-2011, 12:00 AM
    Filed under: ASP.NET, ASP.NET MVC, Code, Data Annotations, jQuery, MVC, Tips, Validation, Visual Studio
Page 1 of 1 (5 items)