Friday, July 9, 2010 8:28 PM
A perennial choice that web developers have to make is whether to store uploaded files to the file system or a database. Each method has its pros and cons, and the debate over which approach is best continues to rage. This article will not add to the noise. It will simply demonstrate how to upload files to the Sql Server CE database which is the default option in Web Pages, and how to retrieve them for users again.
Viewed 25582 times
Wednesday, July 7, 2010 10:04 PM
Most web development frameworks provide features that assist with creating a consistent look and feel across pages, or make provision for managing reusable partial content, such as headers and footers. The Web Pages framework is no exception. This article examines the core features offered by its Razor view engine for handling templated layouts and common blocks of content.
Viewed 23968 times
Tuesday, July 6, 2010 9:35 PM
This article will take a first look at WebMatrix - Microsoft's new IDE for developing Web Pages applications. In it, I will cover a number of the core features that will make Web Matrix the ideal starter's web development framework as I create a very simple application.
Viewed 38454 times
Tuesday, July 6, 2010 8:51 PM
There has been a spate of announcements recently from Scott Guthrie, the main Microsoft man responsible for ASP.NET over the last week or so - the launch of IIS Express, a new version of SQL Server Compact Edition (CE) that can be run in medium trust environments, and a new View Engine and syntax called Razor. Each of these announcements have generated a lot of reaction, and they are each significant in themselves. They all make ASP.NET easier for existing developers. However, if you put them all together, and throw in a new framework and IDE, they make ASP.NET much, much easier for new developers coming to ASP.NET for the first time. So that's what Microsoft have gone and done. And today, they have announced the first Beta version of WebMatrix - a head-on competitor to WAMP stacks.
Viewed 19592 times
Wednesday, June 23, 2010 7:43 AM
Include files within classic ASP are about the only way to achieve some measure of code-reuse within frameworks that offer little or nothing by way of composition or inheritance. Judging by the number of questions in forums, there are still a lot of people moving across from classic ASP who are puzzled as to how to approach replacing include files within ASP.NET. A number of articles illustrate individually how to do so for site-wide layout reasons, including widgets, reusing global functions, or actually including the content of a file. However, I haven't been able to find one resource that brings all these together, hence the purpose of this article.
Viewed 98506 times
Monday, June 14, 2010 10:15 AM
Named Anchors are used to generate links to specific locations within a web document. Unless you are careful, you may end up having a little trouble getting these to work using the MVC LinkExtension helpers.
Viewed 14504 times
Monday, May 31, 2010 8:42 PM
My previous article showed how to use a custom ActionResult and the classes within WCF to generate an RSS feed. There are no similar classes to help build a valid Google Site Map for an ASP.NET MVC application. So here's how your can build your own.
Viewed 8039 times
Monday, May 31, 2010 9:14 AM
When I looked at producing RSS Feeds in ASP.NET MVC before, I used the ContentResult method to return XML. Best Practice suggests that you should create a new ActionResult if required. So this article looks at creating an RssResult, and a different way to generate the feed itself.
Viewed 8293 times
Saturday, May 22, 2010 10:56 PM
Following on from the recent spate of extensions methods I've posted, here's another I use to convert URLs and email addresses into links within HTML. You may want to restrict users from submitting HTML tags via forms in your application, which means that URLs and email addresses that they submit appear as plain text unless they are subjected to some kind of processing.
Viewed 10262 times
Saturday, May 22, 2010 7:41 PM
A common question in the forums is how to highlight key words found in search results. Here's an extension method that does that, both for partial matches, or whole word matches.
Viewed 20472 times
Friday, May 21, 2010 9:12 PM
The jQuery Cycle plug-in is most often used for creating image slide shows. However, it's just as easy to use to create a news scroller from a ListView. Here, I look a doing just that. I also look at an alternative jQuery plug-in (NewsTicker) that gives the effect of the classic BBC News Ticker.
Viewed 19346 times
Sunday, May 16, 2010 9:59 AM
Displaying the first n characters of a block of text on a page without chopping words off halfway through is a common requirement. There are a number of ways to achieve this, but here's an extension method that you might find useful.
Viewed 21621 times
Monday, May 3, 2010 11:36 PM
Managing shopping carts using Sessions is the source of much confusion for beginners to ASP.NET. This article looks at how to do this so that items can be added and removed by customers easily before they commit to their purchase.
Viewed 58856 times
Monday, April 19, 2010 10:24 PM
People often post questions to the forums at www.asp.net asking what they need to learn to become an accomplished ASP.NET Web Developer. Answers vary, but tend to focus on learning the framework and a bit of SQL, along with finding your way around Visual Web Developer, or if you can afford it, Visual Studio. My answer tends to consist of the same list of items:
Viewed 17020 times
Monday, March 29, 2010 10:17 PM
The MVC 2.0 Framework was finally RTM'd on March 11th 2010, so I took the opportunity to update my Contact Manager application with some of its new features. While the focus of this article is validating the Model using DataAnnotations, I also touch on one or two other new features in the latest release.
Viewed 16074 times