Latest Microsoft Blogs

Browse by Tags

Related Posts

  • ASP.Net MVC in Visual Studio 2010 Beta 2

    Visual Studio 2010 Beta 2 contains ASP.Net MVC 2 in the box so there is no need to install an out of band update to Visual Studio 2010 to develop ASP.Net MVC applications. Phil Haack posted about the in-box experience for Beta 2 andd also provides some info on how to upgrade your ASP.Net MVC 1 apps to ASP.Net MVC 2. From a tooling perspective, all of the new functionality released in ASP.Net MVC 2 Preview 2 for Orcas is available in Visual Studio 2010 Beta 2 including support for Single Project Areas . Additionally, if you look in the Scripts folder of a new ASP.Net MVC application, you will notice that jquery.validate is included as well as a vsdoc file to go with it. I'll post more on how to use jquery.validate in the coming weeks but...


  • T4MVC 2.4.04 update: MVC 2 support, new settings, cleanup, fixes

    To get the latest build of T4MVC: Go to download page on CodePlex   Though I haven’t blogged for a while about T4MVC, I’ve been making a few minor updates and only sent notification via Twitter.  Now, I have a few things that are worth discussing in a little more detail.  Note that you can see the complete list of changes from version to version in the readme.txt file that comes with it.  BTW, I used to have all this revision information directly in the .tt file, but it was getting a little long so I moved it to the readme. The changes described below were added between version 2.4.00 and 2.4.04.   MVC 2 Preview 2 support The most interesting things to many people is that I just made a fix to allow T4MVC to work on MVC...


  • Single Project Add View in ASP.Net MVC 2 Preview 2

    Last week we released ASP.Net MVC 2 Preview 2 for Visual Studio 2008 Sp1. In the box support for single project areas is now included and the Add View tool has been modified to streamline this scenario. A walkthrough that creates two simple single project areas can be found here . If you follow the steps in the walkthrough you will notice that Add Controller and Add View are now available in the single project areas in your ASP.Net MVC 2 Preview 2 application. Here are some screenshots that show off the tooling changes. Right-Clicking the Controllers folder of any single project area (Areas –> Blog –> Controllers) will invoke the familiar Add Controller dialog. The new controller will be added to the Controllers folder of the single project...


  • Walking the tight rope

    I think today is an appropriate time to write this post, as Rob Conery is leaving Microsoft tomorrow . “Who?”, you might ask. Rob is the author of the excellent MVC Storefront and Kona series where he explored the challenges in building an MVC-bound storefront application. I’ve been working with Rob for a few months on the continuation of that, which will be the subject of this post. This is challenging for a number of reasons. First, Rob’s are large shoes to fill (he’s a 12, I’m an 11). That’s fine, I’m just going to do things my way and try to have as much fun as possible (and communicate that if I can). Second, the focus of the application has changed and that is a much more important challenge. Rob built this as a learning tool, as much...


  • A total n00b’s guide to migrating from a custom data layer to Nhibernate: getting started

    (Screencast can be found at the end of the post) To be clear when I say “total n00b”, I’m not talking about you, dear reader, I’m talking about me. The last time I wrote any serious data access code was circa 2002. Since then, I got hired by the Evil Empire and started developing new tools to make it easier to build demos of Northwind master-details. I jest, I jest. Or do I? So let me explain what I’m going to talk about in this and future related blog posts. We have this e-commerce application that Rob started and that we’re going to continue developing. Last time Rob touched the data access, he wanted to experiment with going back to less abstraction and to working directly with that interesting data-centric Domain Specific Language, you know...


  • Web Application Project Vs Web Site

    Few days back I summarized the difference between a project system and a project templates ; today I want to focus on key differences between different project systems available for web developers in Visual Studio… You might be aware of the fact that we have two different types of project systems for Web developers i.e Web Application Projects (WAPs) and Web Site Projects (WSPs)…  Often time I get asked this question on which type of project should to use for web development…  Sometimes web developers even start a religious war on the two choices, honestly here you have an option to choose the god of your own choice and this post is my attempt to help you make an informed decision… Most of the time I land up asking questions to people...


  • ASP.NET MVC V2 Preview 1 Released

    The ASP.NET team just released the first public preview of ASP.NET MVC Version 2.  You can download it here . Today’s preview works with .NET 3.5 SP1 and VS 2008, and can be installed side-by-side on the same machine as ASP.NET MVC 1.0 (meaning they don’t conflict and your existing ASP.NET MVC 1.0 projects will not be impacted if you install it).  If you have both ASP.NET MVC 1.0 and ASP.NET MVC 2.0 installed you’ll see two ASP.NET MVC project templates within Visual Studio 2008’s “New Project” dialog: The release notes that come with the ASP.NET MVC 2 Preview release detail how to upgrade existing ASP.NET MVC 1.0 projects to use V2 if you’d like to migrate them forward to take advantage of the new features. New Features ASP.NET MVC...


  • T4MVC 2.4 updates: settings file, sub view folders, ActionName support and more

    To get the latest build of T4MVC: Go to download page on CodePlex This post is a continuation of various previous posts on the T4MVC template for ASP.NET MVC: A new and improved ASP.NET MVC T4 template The MVC T4 template is now up on CodePlex T4MVC 2.2 update: Routing, Forms, DI container, fixes I last blogged about version 2.2, and there have been a number of changes since that (you can get the full history at the top of the T4MVC.tt file).  This post describes some of those changes.   T4MVC now uses a separate settings file Previously, if you wanted to customize T4MVC, you’d have to change T4MVC.tt directly.  This is fine until you want to grab the next build, and have to hand merge the changes. Instead, it is now using a separate...


  • Two ways to use T4 templates: support code vs. one-time generation

    T4 templates have proven to be useful is a whole range of scenarios, and more and more developers are finding interesting things to do with them. For the most part, all those scenarios fall under two very distinct categories: “support code” versus one-time generation.  Unlike my previous post on CodeDom vs. T4 , here we’re not talking about making a choice between two competing technologies, but simply about using T4 in the way that makes sense for a given scenario. Let’s start with a brief description of the two usage patterns: Support code : here, a T4 template generates a file that you rarely need to look at, and you should never modify.  Instead, it contains “support code” that you can code against.  A great example of this...


  • Mocking indexer getters with Moq

    This is a follow-up on that other post: Mocking indexer setters with Moq . So thanks to that post, we now know how to intercept the setting of a particular indexed property (in our example, an application variable) and set a local variable with the value that was set by the tested code. Now if you want the application to return that same value when queried by the tested code, you also need to mock the indexer getter. This operation is also not entirely trivial. Here’s how you do it: you do a SetupGet chained with a Returns with a lambda expression as the parameter: mockHttpContext .SetupGet(c => c.Application[ "foo " ]) .Returns(() => ( object )map); That last point about using a lambda is pretty important. If you just use map...


Page 1 of 10 (91 items) 1 2 3 4 5 Next > ... Last »
Microsoft Communities