Articles : Page 7 of 11

  • Custom Model Binder for binding drop downs into a DateTime in MVC

    Custom Model Binder for binding drop downs into a DateTime in MVC

    Jul 11
    06

    I have a Nullable DateTime Property in my Model I want to bind painlessly with three drop down select boxes I have for Day Month and Year respectively. First thing to do is to make a new shiny custom model binder. I have done mine by inheriting from DefaultModelBinder (which you will need to include System.Web.Mvc to access). using System; using System.ComponentModel; using System.Web.Mvc; namespace Infrastructure.OFP.ModelBinders { public class MyUserModelBinder : DefaultModelBinder { protect...


  • What’s the Difference Between a Value Provider and Model Binder?

    What’s the Difference Between a Value Provider and Model Binder?

    Jun 11
    30

    ASP.NET MVC 3 introduced the ability to bind an incoming JSON request to an action method parameter, which is something I wrote about before. For example, suppose you have the following class defined (keeping it really simple here): public class ComicBook { public string Title { get; set; } public int IssueNumber { get; set; } } And you have an action method that accepts an instance of ComicBook: [HttpPost] public ActionResult Update(ComicBook comicBook) { // Do something with ComicBo...


  • Delegate feed privileges to other users on MyGet

    Delegate feed privileges to other users on MyGet

    Jun 11
    29

    One of the first features we had envisioned for MyGet and which seemed increasingly popular was the ability to provide other users a means of managing packages on another user’s feed. As of today, we’re proud to announce the following new features: Delegating feed privileges to other users – This allows you to make another MyGet user “co-admin” or “contributor” to a feed. This eases management of a private feed as that work can be spread across multiple people. Making private feeds privat...


  • Enabling conditional Basic HTTP authentication on a WCF OData service

    Enabling conditional Basic HTTP authentication on a WCF OData service

    Jun 11
    28

    Yes, a long title, but also something I was not able to find too easily using Google. Here’s the situation: for MyGet, we are implementing basic authentication to the OData feed serving available NuGet packages. If you recall my post Using dynamic WCF service routes, you may have deducted that MyGet uses that technique to have one WCF OData service serving the feeds of all our users. It’s just convenient! Unless you want basic HTTP authentication for some feeds and not for others… After doin...


  • ASP.NET MVC 3 Docs In Nine Languages

    ASP.NET MVC 3 Docs In Nine Languages

    Jun 11
    27

    In May, we released a tools update for ASP.NET MVC 3 in nine languages other than English. Today I got the good news that ASP.NET MVC 3 documentation is also now available in those nine languages, which arguably is even more helpful to those learning and using ASP.NET MVC. Japanese: http://msdn.microsoft.com/ja-jp/library/gg416514(VS.98).aspx Korean: http://msdn.microsoft.com/ko-kr/library/gg416514(VS.98).aspx Chinese (Simplified): http://msdn.microsoft.com/zh-cn/library/gg416514(VS.98)....


  • June 26th Links: ASP.NET, ASP.NET MVC, .NET and NuGet

    June 26th Links: ASP.NET, ASP.NET MVC, .NET and NuGet

    Jun 11
    27

    Here is the latest in my link-listing series. Also check out my Best of 2010 Summary for links to 100+ other posts I’ve done in the last year. [I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] ASP.NET Introducing new ASP.NET Universal Providers: Great post from Scott Hanselman on the new System.Web.Providers we are working on. This release delivers new ASP.NET Membership, Role Management, Session, Profile providers that work with SQL Ser...


  • Updated Release: Orchard 1.2

    Updated Release: Orchard 1.2

    Jun 11
    13

    Build: 1.2Published: 6/14/2010 How to Install Orchard To install Orchard using Web PI, follow these instructions: http://www.orchardproject.net/docs/Installing-Orchard.ashx. Web PI will detect your hardware environment and install the application.Alternatively, to install the release manually, download the Orchard.Web.1.2..zip file.http://orchardproject.net/docs/Manually-installing-Orchard-zip-file.ashxThe zip contents are pre-built and ready-to-run. Simply extract the contents of the Orchardf...


  • TechDays Belgium: videos are online

    TechDays Belgium: videos are online

    Jun 11
    12

    At the end of April, Microsoft Belgium organized the TechDays Belgium, the annual developer and IT conference in Belgium, to which I had the pleasure to attend. I also manned the Ask The Expert booth and helped attendees with their questions about ASP.NET MVC, Orchard and web development. It was 3 days of very interesting sessions, ranging from the keynote/standup comedy show by Scott Hanselman to the ASP.NET MVC Deep Dive sessions by Hadi Hariri and to the Girls-Power WP7 development sessio...


  • Dependency Injection With ASP.NET HttpModules

    Dependency Injection With ASP.NET HttpModules

    Jun 11
    03

    At the risk of getting punched in the face by my friend Miguel, I’m not afraid to admit I’m a fan of responsible use of dependency injection. However, for many folks, attempting to use DI runs into a roadblock when it comes to ASP.NET HttpModule. In the past, I typically used “Poor man’s DI” for this. I wasn’t raised in an affluent family, so I guess I don’t have as much of a problem with this approach that others do. However, when the opportunity for something better comes along, I’ll tak...


  • MyGet now supports pushing from the command line

    MyGet now supports pushing from the command line

    Jun 11
    01

    One of the work items we had opened for MyGet was the ability to push packages to a private feed from the command line. Only a few hours after our initial launch, David Fowler provided us with example code on how to implement NuGet command line pushes on the server side. An evening of coding later, I quickly hacked this into MyGet, which means that we now support pushing packages from the command line! For those that did not catch up with my blog post overload of the past week: MyGet offers ...