May 2009 - Posts
Here is the latest in my link-listing series . Also check out my ASP.NET Tips, Tricks and Tutorials page and Silverlight Tutorials page for links to popular articles I've done myself in the past. You can also now follow me on twitter ( @realscottgu ) where I also post links and small posts. ASP.NET Using ASP.NET 3.5’s ListView and DataPager Controls to Delete Data : Scott Mitchell continues his excellent tutorial series on the ASP.NET ListView control. In this article he discusses how to handle deleting data with it. ASP.NET ListView: Displaying Hierarchical Data : Adam Pooler writes about how to use the ASP.NET ListView control to display hierarchical data within a web page. ELMAH: Error Logging Module and Handlers for ASP.NET...
Thank you to everyone who came to my talks at Tech-ed India! It was great meeting so many developers in India (I finally got to meet many people who I have been reading their blogs for years). I’ve had several people request the slides and sample files from the talk so I am posting them here. ASP.NET 4 Talk – The slides and sample files. MVC Talk – The slides. The Contact Manager sample application is located at http://www.ASP.net/mvc/learn . AJAX 4.0 Talk – The slides and sample files. Read More...
Hey, we released Visual Studio 2010 Beta 1. JasonZ has a great post with piles of details and a metric crapload of screenshots . Definitely take a moment (or eight) and check out his very detailed post. You can get it NOW if you're an MSDN Subscriber , or after the general announcement on Weds if you're not. Should You Freak Out? I don't think so. There's a lot of stuff that's new and added in .NET 4, but not in that "overwhelming-I-need-to-relearn-everything" way. More in that, "oh, this is way easier/simpler now" way. Like, moving data around with ADO.NET DataServices is easy, binding with client templates is easy, there's F# if you need it, the "dynamic" keyword if you need it, Silverlight's...
I apologize for not blogging this in advance, but the weather this weekend was just fantastic so I spent a lot of time outside with my son. If you haven’t heard yet, Visual Studio 2010 Beta 1 is now available for MSDN subscribers to download. It will be more generally available on Wednesday, according to Soma. You can find a great whitepaper which describes what is new for web developers in ASP 4 which is included. One thing you’ll notice is that ASP.NET MVC is not included in Beta 1. Right now, if you try and open an MVC project with VS 2010 Beta 1, you’ll get some error message about the project type not being supported. The easy fix for now is to remove the ASP.NET MVC ProjectTypeGuid entry as described by this post . We’re working hard to...
I’ve been investigating different unit testing frameworks for JavaScript lately and I stumbled onto FireUnit. FireUnit is a unit testing framework created by John Resig (of well-deserved jQuery fame) and Jan Odvarko. In this blog entry, I provide a brief overview of the FireUnit testing framework. In particular, I explain how you can use FireUnit to unit test JavaScript code. Installing FireUnit FireUnit is implemented as a FireFox extension. This is both bad and good. First, the bad news. You cannot use FireUnit with Internet Explorer, Safari, Chrome, or any other browser than Mozilla Firefox. Here’s the good news. FireUnit extends Firefox with a new Test tab. This Test tab appears as an extra Firebug tab. Therefore, seeing test results is...
Before my trip to India, I bought an HP Mini 2140 netbook . It is a beautiful machine. It weighs only 4 pounds. It has a 1024x576 resolution screen (normal width but short height). It has almost a full sized keyboard. My favorite feature is that, theoretically, it has a 6 cell battery that can last 8 hours – a mind-boggling long amount of time. The mini came with Windows XP pre-installed. That wouldn’t do. So, I immediately downloaded the release candidate of Windows 7 and installed it on the netbook. The mini does not have a DVD or CD drive. I copied the Windows 7 download to a USB drive and mounted the drive using Daemon Tools. I was able to install Windows 7 from the USB drive . Next, I installed Windows Live Sync (what used to be called...
A while back, I wrote about Donut Caching in ASP.NET MVC for the scenario where you want to cache an entire view except for a small bit of it. The more technical term for this technique is probably “cache substitution” as it makes use of the Response.WriteSubstitution method, but I think “Donut Caching” really describes it well — you want to cache everything but the hole in the middle. However, what happens when you want to do the inverse. Suppose you want to cache the donut hole, instead of the donut? I think we should nickname all of our software concepts after tasty food items, don’t you agree? In other words, suppose you want to cache a portion of the view in a different manner (for example, with a different duration) than the entire view...
I’ll be in India all next week giving 3 talks at Microsoft Tech-ed in Hyderabad. This is my first trip to India. I have no idea what to expect. I’ll be giving the following three talks: Welcome to ASP.NET 4.0 – Developing Next Gen Web Applications Developing MVC Based Web Apps using ASP.NET MVC ASP.NET AJAX 4.0 I get to talk about all of the new innovations coming with the next version of ASP.NET Web Forms and ASP.NET AJAX (some exciting new stuff to talk about there). And, I get to do my almost pure code walkthrough of building an ASP.NET MVC application. Wow, look at my giant face on on the India Tech-ed site. You can still register for the event at http://www.microsoft.com/india/teched2009/ . Read More...
Jeff blogged last month about Exception-Driven Development . I've been using ELMAH for years and you should too . Having great instrumentation in your app is such a joy. I added ELMAH to NerdDinner and have learned all sorts of things. It's amazing that someone would care to hack a site about Nerds eating dinner, but they try. This wasn't a hack, but a great bug found in my Nerd Dinner Mobile code that I wouldn't have thought to look for. Here I'm getting a NullReference Exception...why? Well, here's the code: private bool UserAgentIs(ControllerContext controllerContext, string userAgentToTest) { return (controllerContext.HttpContext.Request.UserAgent.IndexOf(userAgentToTest, StringComparison.OrdinalIgnoreCase) > 0...
As I’m sure you know, we developers are very particular people and we like to have things exactly our way. How else can you explain long winded impassioned debates over curly brace placement ? So it comes as no surprise that developers really care about what goes in ( and behind ) their .aspx files, whether they be pages in Web Forms or views in ASP.NET MVC. For example, some developers are adamant that a page should not include server side script blocks, while others don’t want their views to contain Web Form controls. Wouldn’t it be great if you could have your views reject such code constructs? Fortunately, ASP.NET is full of lesser known extensibility gems which can help in such situations such as the PageParseFilter . MSDN describes this...
More Posts