A collection of articles and tutorials on web development with ASP.NET by Mike Brind

Latest Entries

WebMatrix - Consistent Look And Feel With Razor

Wednesday, July 7, 2010 10:04 PM

ASP.NET Web Pages WebMatrix Razor

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.

Click to read more about WebMatrix - Consistent Look And Feel With Razor ...

Viewed 23900 times

2 Comments for this item

WebMatrix - A First Application

Tuesday, July 6, 2010 9:35 PM

ASP.NET Web Pages WebMatrix

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.

Click to read more about WebMatrix - A First Application ...

Viewed 38148 times

14 Comments for this item

Introducing WebMatrix - An Easier Way To Do ASP.NET

Tuesday, July 6, 2010 8:51 PM

ASP.NET Web Pages WebMatrix

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.

Click to read more about Introducing WebMatrix - An Easier Way To Do ASP.NET ...

Viewed 19446 times

1 Comment for this item

Classic ASP Include Files in ASP.NET

Wednesday, June 23, 2010 7:43 AM

Classic ASP ASP.NET Web Forms

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.

Click to read more about Classic ASP Include Files in ASP.NET ...

Viewed 97523 times

2 Comments for this item

Named Anchors And MVC Urls

Monday, June 14, 2010 10:15 AM

ASP.NET MVC

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.

Click to read more about Named Anchors And MVC Urls ...

Viewed 14464 times

0 Comments for this item

Google Sitemap Generation From A Custom SiteMapResult

Monday, May 31, 2010 8:42 PM

ASP.NET MVC

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.

Click to read more about Google Sitemap Generation From A Custom SiteMapResult ...

Viewed 8012 times

4 Comments for this item

Rss Feed Generation From a Custom RssResult

Monday, May 31, 2010 9:14 AM

ASP.NET MVC

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.

Click to read more about Rss Feed Generation From a Custom RssResult ...

Viewed 8263 times

0 Comments for this item

Converting URLs Into Links With Regex

Saturday, May 22, 2010 10:56 PM

C# Extension Method

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.

Click to read more about Converting URLs Into Links With Regex ...

Viewed 10217 times

1 Comment for this item

Highlighting Keywords Found In Search Results

Saturday, May 22, 2010 7:41 PM

C# ASP.NET 3.5 Extension Method ASP.NET Web Forms

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.

Click to read more about Highlighting Keywords Found In Search Results ...

Viewed 18664 times

4 Comments for this item

jQuery News Scrollers and Tickers with a ListView

Friday, May 21, 2010 9:12 PM

ASP.NET 3.5 jQuery

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.

Click to read more about jQuery News Scrollers and Tickers with a ListView ...

Viewed 19316 times

1 Comment for this item

Displaying The First n Characters Of Text

Sunday, May 16, 2010 9:59 AM

C# ASP.NET 3.5 Extension Method

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.

Click to read more about Displaying The First n Characters Of Text ...

Viewed 21455 times

13 Comments for this item

Sessions and Shopping Carts

Monday, May 3, 2010 11:36 PM

ASP.NET 3.5

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.

Click to read more about Sessions and Shopping Carts ...

Viewed 58597 times

12 Comments for this item

Book Review - Beginning ASP.NET 4 in C# and VB

Monday, April 19, 2010 10:24 PM

Book Review

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:

Click to read more about Book Review - Beginning ASP.NET 4 in C# and VB ...

Viewed 16861 times

0 Comments for this item

Validating the Contact Manager with MVC 2.0 And VS 2010

Monday, March 29, 2010 10:17 PM

ASP.NET MVC

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.

Click to read more about Validating the Contact Manager with MVC 2.0 And VS 2010 ...

Viewed 16040 times

7 Comments for this item

ASP.NET MVC v. Web Forms Debate - My View

Monday, February 22, 2010 9:53 PM

General ASP.NET 3.5 ASP.NET MVC

It seems that the whole world (and Margate) is having its say on which is better - MVC or Web Forms. Scott Guthrie posted his views on technical debates in general, and then contributed his thoughts on MVC v. Web Forms. Ian Cooper has an interesting contribution to make to the debate too. Rob Conery (formerly of Microsoft) posted probably the most linked to opinion on the matter. (There - I've just added another link...) A lot of other blog posts around scream that MVC is better because its better. One even tries to posit the notion that some kind of score card approach can help you decide.

Click to read more about ASP.NET MVC v. Web Forms Debate - My View ...

Viewed 49292 times

12 Comments for this item