Click to Rate and Give Feedback
Related Articles

Here the author dissects the ASP.NET MVC framework and looks at how controllers work. He then explains how the framework interacts with your controllers and how you can influence those interactions.

Scott Allen

MSDN Magazine May 2009

...

Read more!

Jeremy Miller continues his discussion of persistence patterns by reviewing the Unit of Work design pattern and examining the issues around persistence ignorance.

Jeremy Miller

MSDN Magazine June 2009

...

Read more!

We demonstrate creating a peer-to-peer processing platform where multiple players function together for a common purpose: getting your work done.

Matt Neely

MSDN Magazine June 2009

...

Read more!

This month we demonstrate how easy it is to use IronPython to test .NET-based libraries.

James McCaffrey

MSDN Magazine June 2009

...

Read more!

Cobra, a descendant of Python, offers a combined dynamic and statically-typed programming model, built-in unit test facilities, scripting capabilities, and much more. Feel the power here.

Ted Neward

MSDN Magazine June 2009

...

Read more!

Also by this Author

This month the Toolbox column takes a look at database logging, Joel Spolsky's blog, printing code projects, and ASP.NET reading.

Scott Mitchell

MSDN Magazine May 2008

...

Read more!

This month we take a look at FxCop and other tools that enforce your design rules, along with jQuery.

Scott Mitchell

MSDN Magazine December 2008

...

Read more!

This month, more of the tools you need to get your job done.

Scott Mitchell

MSDN Magazine December 2007

...

Read more!

This month's products include DatabaseSpy, FileZilla, NCache, and more.

Scott Mitchell

MSDN Magazine October 2007

...

Read more!

This month we look at implementing the Active Record Pattern in your .NET application and how aspect-oriented programming yields separation of concerns.

Scott Mitchell

MSDN Magazine February 2009

...

Read more!

Popular Articles

Writing a Web application with ASP.NET is unbelievably easy. So many developers don't take the time to structure their applications for great performance. In this article, the author presents 10 tips for writing high-performance Web apps. The discussion is not limited to ASP.NET applications because they are just one subset of Web applications.

Rob Howard

MSDN Magazine January 2005

...

Read more!

Kenny Kerr sings the praises of the new Visual C++ 2008 Feature Pack, which brings modern conveniences to Visual C++.

Kenny Kerr

MSDN Magazine May 2008

...

Read more!

When incorporating the ASP.NET DataGrid control into your Web apps, common operations such as paging, sorting, editing, and deleting data require more effort than you might like to expend. But all that is about to change. The GridView control--the successor to the DataGrid-- extends the DataGrid's functionality it in a number of ways. First, it fully supports data source components and can automatically handle data operations, such as paging, sorting, and editing, as long as its bound data source object supports these capabilities. In addition, ...

Read more!

Paul DiLascia

MSDN Magazine August 2002

...

Read more!

This article introduces 10 development tools that can increase your productivity, give you a better understanding of .NET, and maybe even change the way that you develop applications. The tools covered include NUnit to write unit tests, Reflector to examine assemblies, FxCop to police your code, Regulator to build regular expressions, NDoc to create code documentation and five more.

James Avery

MSDN Magazine July 2004

...

Read more!

Toolbox
Updated grid controls, open-source comparison tools, and more
Scott Mitchell

Upgrade Your Windows Forms Grid
The grid is probably the most frequently used advanced user interface element as it is the easiest and most straightforward way to display and edit tabular data. Since the early days of Visual C++® and Visual Basic®, Microsoft has provided developers with a free, simple grid control. But developers can also take advantage of the grids that are available from third-party vendors.
One third-party vendor for Microsoft® .NET Framework Windows® Forms grid controls is FarPoint Technologies, Inc., which offers a grid component named Spread for Windows Forms 3. To add Spread for Windows Forms to your .NET application, simply drag an instance from the Visual Studio® Toolbox and drop it onto your form. Its initial data can be specified manually, programmatically, or via databinding.
Adding a Spread for Windows Forms grid to your application is like adding an instance of Microsoft Excel®. Like Excel, Spread for Windows Forms can include multiple sheets and formulas, have merged cells and cells that span columns, provide column-level sorting, and more. With one line of code you can import an Excel spreadsheet into a grid. Similarly, grid data can be exported to an Excel spreadsheet or XML file.
Customizing a Spread for Windows Forms grid in Visual Studio is particularly easy thanks to the Spread Designer. This standalone program, which can be launched from the Properties window in Visual Studio, enables developers to specify the appearance, layout, and format of their grids.
Grids are as routine a fixture in user interface design as buttons and labels. And some third-party grid products, such as Spread for Windows Forms, offer developers functionality beyond that provided by Microsoft.
Price: $899 per developer license.
Spread for Windows Forms Grids Are Customizable  (Click the image for a larger view)

Add Professional-Looking Date Textboxes to Your Web Site
Large, commercial Web sites that prompt users for date values—such as travel reservation sites—often provide a textbox with a calendar icon next to it. Clicking this calendar icon displays the current month in a popup calendar and enables the user to select a date by simply clicking on it.
Such rich date entry user interfaces are found less often on intranet sites and on smaller Web sites, in part because ASP.NET does not include any built-in date-related Web controls. The good news is that there are many third-party date controls available. One such product is Peter's Date Package (version 2.0.4), created by Peter Blum, which comprises 24 ASP.NET Web controls. The flagship control is the DateTextBox, which displays a textbox with a calendar icon that, when clicked, shows a popup calendar interface. The calendar displays the current month with icons to display the dates from the previous or next months. The pop-up also includes a month and year picker, which expedites entering dates far in the future or past. Furthermore, the control automatically emits client-side script that prevents the user from typing non-date values into the textbox (such as letters or non-date related punctuation).
In addition to the DateTextBox control, Peter's Date Package includes a standalone month and year picker, an AnniversaryTextBox that lets users specify only a month and day, and a TimePicker control. There is also an array of date-specific validation controls. The UnselectableDatesValidator allows a developer to indicate a set of invalid dates, while the DateCompareValidator ensures that the dates entered into two date controls maintain a certain relationship, such as the first control's value being less than the second's.
Best of all, Peter's Date Package is a cinch to use. Configuring a new or existing Web site to use the date controls takes less than a minute, and including these rich date controls in a Web page is as simple as drag and drop. If you get stuck, Peter Blum is quick to answer questions posted to the support forums.
Price: $90 per Web server.
DateTextBox is the Flagship Control of Peter's Date Package  (Click the image for a larger view)

Quickly Compare and Merge Files
Since developers work with the source code for applications as a collection of files, we often need to compare different versions of files or folders and, perhaps, synchronize them. For example, you may need to determine what files have been modified since the last build, or update the production Web site's pages with the modifications made on the staging server. Programs that find differences in files have been around for decades—Windows has long included such a program, called WinDiff. Furthermore, virtually all source code control providers bundle some sort of WinDiff-like program to facilitate comparing different file versions under source control. But some developers want more capabilities than WinDiff and source code control programs offer.
WinMerge (version 2.6.8) is an open-source file and folder comparison and synchronization tool that is free, fast, and feature rich. When launched, WinMerge prompts you to select two files or folders to compare. You can also specify a file filter and line filter at this time. When including a set of files in a folder (or subfolders), the file filter indicates what files to include or exclude. For example, Web developers might want to use a filter that includes HTML and ASP.NET Web pages, but excludes GIF, JPG, CSS, and JavaScript files. You can create your own file filters or use one of the several that ships with WinMerge. Line filters can be used to exclude comparing lines of text that match a particular regular expression.
If you are comparing files from two different folders, WinMerge lists the files in each folder and whether or not they are identical. Clicking on one of the listed files displays a window showing the contents of the two files, using colors to indicate their differences.
WinMerge also makes it easy to synchronize files. You can step through the differences one at a time and choose whether to make the left file's difference the same as the right's, or vice versa. You can also make one file exactly like the other with the click of a button.
In addition to its intuitive graphical user interface, WinMerge can be executed from the command line and can be integrated with the Windows shell.
Price: Free.
WinMerge Has an Intuitive Graphical Interface  (Click the image for a larger view)

A Guide to Microsoft ASP.NET AJAX
AJAX is used by many to build interactive Web sites that offer a streamlined, desktop application-like user experience. AJAX-enabled sites use JavaScript to asynchronously communicate with the Web server and to seamlessly update the browser's interface accordingly. There are a variety of third-party and open-source AJAX frameworks, and now Microsoft has released its own AJAX framework, ASP.NET AJAX (ajax.asp.net).
Most AJAX-related books offer a rather exhaustive low-level look at the technologies involved. But that level of detail is unnecessary for a developer who wants to quickly get started building AJAX-enabled ASP.NET apps. These developers will find Matt Gibbs and Dan Wahlin's Professional ASP.NET 2.0 AJAX (Wrox Press, 2007) to be just what the doctor ordered. The book focuses on core AJAX concepts such as asynchronous postbacks, the browser's Document Object Model, and making HTTP requests via script—and each is explained in terms familiar to ASP.NET developers. Working with the Microsoft ASP.NET AJAX library is also explored, as is using the UpdatePanel control, the ASP.NET client library, ScriptManager, and the controls in the AJAX Toolkit.
Professional ASP.NET 2.0 AJAX also showcases tips and techniques for debugging. The techniques involved in building AJAX-enabled Web applications complicate the testing process. Since many AJAX-related functions occur in a Web browser, developers lose the rich debugging support available with server-side code. The chapter on testing examines ASP.NET AJAX's debugging-related classes and helpful tools such as Script Debugger from Microsoft, Eric Lawrence's Fiddler, and Nikhil Kothari's Web Development Helper. Additionally, the book explores the challenges involved in deploying any AJAX-enabled ASP.NET applications.
Price: $39.99.

Send your questions and comments for Scott to toolsmm@microsoft.com.


Scott Mitchell, author of numerous books and founder of 4GuysFromRolla.com, is an MVP who has been working with Microsoft Web technologies since 1998. Scott is an independent consultant, trainer, and writer. You can reach him at Mitchell@4guysfromrolla.com or via his blog at ScottOnWriting.NET.

Page view tracker