-
|
One of the upcoming new features being added to ASP.NET MVC 2 Beta is a little helper method called Html.RenderAction and its counterpart, Html.Action . This has been a part of our ASP.NET MVC Futures library for a while, but is now being added to the core product. Both of these methods allow you to call into an action method from a view and output the results of the action in place within the view. The difference between the two is that Html.RenderAction will render the result directly to the Response (which is more efficient if the action returns a large amount of HTML) whereas Html.Action returns a string with the result. For the sake of brevity, I’ll use the term RenderAction to refer to both of these methods. Here’s a quick look at how...
|
-
|
Today at PDC09 (the keynote was streaming live ), Bob Muglia announced the release of ASP.NET MVC 2 Beta . Feel free to download it right away! While you do that I want to present this public service message. The Beta release includes tooling for Visual Studio 2008 SP1. We did not ship updated tooling for Visual Studio 2010 because ASP.NET MVC 2 is now included as a part of VS10, which is on its own schedule. Unfortunately, because Visual Studio 2010 Beta 2 and ASP.NET MVC 2 Beta share components which are currently not in sync, running ASP.NET MVC 2 Beta on VS10 Beta 2 is not supported . Here are some highlights of what’s new in ASP.NET MVC 2. RenderAction (and Action) AsyncController Expression Based Helpers (TextBoxFor, TextAreaFor, etc....
|
-
|
Just about two years ago I joined Microsoft . I'm fortunate to work in a home office with a great team that I now lead . We work for the group at Microsoft that runs MSDN , TechNet , ASP.NET , Silverlight.NET , WindowsClient.NET , basically all the online education stuff. The giant group is called STO (Server & Tools Online) and our little group is " stoninja ." That's our internal mailing alias. We create content for all of the sites above but we're also active members of the community. We listen and drive feedback back into the product group. We're not part of the product evangelism group (DPE - Developer Platform Evangelism), but rather we focus primarily on online content creation. I like to think that we're...
|
-
|
I learned something new yesterday about interface inheritance in .NET as compared to implementation inheritance. To illustrate this difference, here’s a simple demonstration. I’ll start with two concrete classes, one which inherits from the other. Each class defines a property. In this case, we’re dealing with implementation inheritance . public class Person { public string Name { get; set; } } public class SuperHero : Person { public string Alias { get; set; } } We can now use two different techniques to print out the properties of the SuperHero type: type descriptors and reflection. Here’s a little console app that does this. Note the code I’m showing below doesn’t include a few Console.WriteLine calls that I have in the actual app. static...
|
-
|
In a recent blog post, I introduced ASP.NET 4’s new HTML Encoding code block syntax as well as the corresponding IHtmlString interface and HtmlString class. I also mentioned that ASP.NET MVC 2 would support this new syntax when running on ASP.NET 4 . In fact, you can try it out now by downloading and installing Visual Studio 2010 Beta 2. I’ve also mentioned in the past that we are not conditionally compiling ASP.NET MVC 2 for each platform. Instead, we’re building System.Web.Mvc.dll against ASP.NET 3.5 SP1 and simply including that one in VS08 and VS10. Thus when you’re running ASP.NET MVC 2 on ASP.NET 4, it’s the same byte for byte assembly as the same one you would run on ASP.NET 3.5 SP1. This fact ought to raise a question in your mind. If...
|
-
|
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...
|
-
|
Who loves you? Not only is Visual Studio 2010 Beta 2 now available for everyone to download (not just subscribers) but I've got 11 short video interviews with the ASP.NET 4 team up on Channel 9. I was up in Redmond just last week and made sure to stop by the offices of as many ASP.NET developers and program managers as I could. I chatted with a few faces you may recognize and a few you may not. All of them are working hard to make ASP.NET 4 cool. I'm still working on my video techniques, and I used two different HD cameras to film these videos. Your feedback (negative AND positive) is always appreciated. This series of videos is called Hanselminutes on 9 and you can get to all of these (and many more) using the Channel 9 Tag " hanselminuteson9...
|
-
|
You probably don’t need me to tell you that Visual Studio 2010 Beta 2 has been released as it’s been blogged to death all over the place. Definitely check out the many blog posts out there if you want more details on what’s included. This post will focus more on what Visual Studio 2010 means to ASP.NET MVC and vice versa. In the box baby! Well one of the first things you’ll notice is that ASP.NET MVC 2 Preview 2 is included in VS10 Beta 2. When you select the File | New menu option, you’ll be greeted with an ASP.NET MVC 2 project template option under the Web node. Note that when you create your ASP.NET MVC 2 project with Visual Studio 2010, you can choose whether you wish to target ASP.NET 3.5 or ASP.NET 4. If you choose to target ASP.NET 4...
|
-
|
Lots of big stuff happening this week. Today Visual Studio 2010 Beta 2 is available to MSDN Subscribers and it'll be available for everyone on Wednesday. I'm running Beta 2 on all my machines now and really digging it. It's much faster than Beta 1 and I'm doing all my work in it now. It's come a long way and I'm really impressed at the polish. .NET 4 This is a big deal. This isn't ".NET 3.6" - there are a lot of improvements of .NET 4, and it's not just "pile on a bunch of features so you get overwhelmed." I've been working with and talking to many of the teams involved and even though it's a cheesy thing to say, this is a really customer-focused release. Shouldn't every release...
|
-
|
My one-hundred-and-eighty-forth podcast is up . Scott's in Seattle this week and catches Microsoft Program Manager (and one of 1000 Scott's) Scott Hunter who shares insights in the history and future of ASP.NET 4. What's coming in VS2010? Subscribe: Download: MP3 Full Show Do also remember the complete archives are always up and they have PDF Transcripts , a little known feature that show up a few weeks after each show. Telerik is our sponsor for this show. Check out their UI Suite of controls for ASP.NET . It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't...
|