Articles : Page 1 of 1

  • MVC 3 AdditionalMetadata Attribute with ViewBag to Render Dynamic UI

    MVC 3 AdditionalMetadata Attribute with ViewBag to Render Dynamic UI

    Jan 11
    31

    A few months ago I blogged about using Model metadata to render a dynamic UI in MVC 2. The scenario in the post was that we might have a view model where the questions are conditionally displayed and therefore a dynamic UI is needed. To recap the previous post, the solution was to use a custom attribute called [QuestionId] in conjunction with an “ApplicableQuestions” collection to identify whether each question should be displayed. This allowed me to have a view model that looked like this: ...


  • 3 things that changed ASP.NET development in 2010

    3 things that changed ASP.NET development in 2010

    Dec 10
    23

    As 2010 draws to a close I thought about how I was writing code last year. I realised how much development has changed in just one year. I want to look at how my work has evolved during 2010. Entity Framework 4I really like using Entity Framework. I wasn't quite sure about it in its first version, however, since the release of Entity Framework 4 in April I fully adopted it. It solves so many problems that I feel exist in modern web development. I like stored procedures, I know a lot about usin...


  • Class-Level Model Validation with EF Code First and ASP.NET MVC 3

    Class-Level Model Validation with EF Code First and ASP.NET MVC 3

    Dec 10
    10

    Earlier this week the data team released the CTP5 build of the new Entity Framework Code-First library. In my blog post a few days ago I talked about a few of the improvements introduced with the new CTP5 build. Automatic support for enforcing DataAnnotation validation attributes on models was one of the improvements I discussed. It provides a pretty easy way to enable property-level validation logic within your model layer. You can apply validation attributes like [Required], [Range], a...


  • Using RavenDB with ASP.NET MVC

    Using RavenDB with ASP.NET MVC

    Nov 10
    08

    Traditionally when you think about a database you think of tables, views, indexes and stored procedures. If you have made a career out of developing database centric applications like I have, then chances are that you have spent a great deal of time dealing with issues around referential integrity, normalization and performance. Unless you have been living underneath a rock, then you have probably heard of the newest database trend named NoSQL. NoSQL refers to non relational document databas...


  • Introducing NuPack Package Management for .NET - Another piece of the Web Stack

    Introducing NuPack Package Management for .NET - Another piece of the Web Stack

    Oct 10
    06

    Microsoft's been filling out the Web Stack with more and more right-sized LEGO pieces lately, and today ScottGu announced the developer preview of NuPack. It's a piece of the stack that's been notably missing for years and after using it for a while now, I'm not sure how I lived without it. NuPack is a package management system for .NET. The goal of NuPack is to make the process of incorporating third party libraries into your solutions as simple as possible. NuPack - The Idea Here's how ...


  • MVC 2 Model Metadata to Render Dynamic UI

    MVC 2 Model Metadata to Render Dynamic UI

    Sep 10
    09

    Recently we had a project where we needed to render certain questions on the screen dynamically based on answers to previous questions on previous screens.  For questions that need to dynamically be visible/invisible on the same screen, this can simply be controlled with jQuery.  However, in this case, based on the user’s input on previous screens we know there are certain questions that will not be applicable before the current screen even loads. In this case, we could use jQuery to set those...


  • August 29th Links: .NET, ASP.NET, IIS Express, Silverlight, Windows Phone 7

    August 29th Links: .NET, ASP.NET, IIS Express, Silverlight, Windows Phone 7

    Aug 10
    30

    Here is the latest in my link-listing series. Also check out my VS 2010 and .NET 4 series and ASP.NET MVC 2 series for other on-going blog series I’m working on. [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] .NET/WPF/EF 5 Little C#/.NET Wonders that Make Code Better: Nice blog post from James that highlights 5 nice language/framework tips you can take advantage of within your apps. I’m betting a lot of peopl...



  • 1