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

Latest Entries

Razor Web Pages E-Commerce - Adding A Shopping Cart To The Bakery Template Site

Friday, February 15, 2013 7:31 PM

ASP.NET Web Pages WebMatrix Razor

The ASP.NET Web Pages Bakery template site is designed as a starting point for a site that displays products. It also features an order form for customers to specify a quantity for a specific product and provide their shipping address. The site doesn't provide for multiple product selection. If you want a shopping cart for the Bakery site, you need to create it yourself. This article looks at the design considerations behind an effective shopping cart, and shows how to build one.

Click to read more about Razor Web Pages E-Commerce - Adding A Shopping Cart To The Bakery Template Site ...

Viewed 39534 times

3 Comments for this item

Consuming Feeds And Web Services In Razor Web Pages

Tuesday, February 5, 2013 7:55 PM

ASP.NET Web Pages WebMatrix

Increasing numbers of businesses are making services and data available to third parties via Web Services or feeds. Data format and protocols can vary significantly across service providers, so here is a look at how to manage the consumption of a number of popular formats delivered through REST and SOAP services within a web site built using the ASP.NET Web Pages framework.

Click to read more about Consuming Feeds And Web Services In Razor Web Pages ...

Viewed 153047 times

0 Comments for this item

Practical Recursion in ASP.NET Web Pages with WebMatrix

Tuesday, January 22, 2013 2:44 PM

ASP.NET Web Pages WebMatrix Razor

Recursive methods are those that call themselves, and they can be applied to solve a number of common practical problems, particularly ones that involve the management and display of hierarchical data. This article explores some of those scenarios and shows how to design recursive helpers and functions that can be used in Web Pages sites.

Click to read more about Practical Recursion in ASP.NET Web Pages with WebMatrix ...

Viewed 28014 times

1 Comment for this item

Exporting The Razor WebGrid To Excel Using OleDb

Monday, January 7, 2013 8:38 PM

ASP.NET Web Pages WebMatrix WebGrid

This article looks at how you can provide your users with the ability to export the contents of a Razor Web Pages WebGrid to an Excel file using OleDb.

Click to read more about Exporting The Razor WebGrid To Excel Using OleDb ...

Viewed 8453 times

4 Comments for this item

SignalR And Knockout In ASP.NET Web Pages Using WebMatrix

Thursday, December 27, 2012 8:17 PM

ASP.NET Web Pages WebMatrix Razor

SignalR is a library that simplifies the creation and management of persistent connections between web servers and clients. This facilitates the development of applications that can display updates to data held on the server in real-time. Chat applications are the most obvious beneficiaries of this technology, but line-of-business applications that need to report availability to users can benefit too. Here, I look at extending the canonical SignalR chat example to incorporate a "who's typing" feature, and I also extend my previous Knockout example to use SignalR.

Click to read more about SignalR And Knockout In ASP.NET Web Pages Using WebMatrix ...

Viewed 40043 times

3 Comments for this item

Exporting The Razor WebGrid To PDF Using iTextSharp

Thursday, December 20, 2012 1:31 PM

iTextSharp ASP.NET Web Pages WebMatrix Razor WebGrid

This article looks at how you can provide your users with the ability to export the contents of a Razor Web Pages WebGrid to a PDF file using the popular free PDF library, iTextSharp.

Click to read more about Exporting The Razor WebGrid To PDF Using iTextSharp ...

Viewed 22122 times

9 Comments for this item

Exporting The Razor WebGrid To Excel

Monday, December 17, 2012 8:17 PM

ASP.NET Web Pages WebMatrix Razor WebGrid

This article looks at how you can provide your users with the ability to export the contents of a Razor Web Pages WebGrid to an Excel file.

Click to read more about Exporting The Razor WebGrid To Excel ...

Viewed 16940 times

2 Comments for this item

Enhancing The WebGrid With Sort Arrows

Friday, December 14, 2012 7:24 PM

jQuery ASP.NET Web Pages WebMatrix Razor WebGrid

The Web Pages WebGrid offers sorting capability out of the box. However, it's not always obvious to the user on which column the grid data is being sorted at any one time, nor the direction in which it is being sorted. The convention is to provide arrows in the column header to act as a clear visual cue. This article looks at a three ways in which you can enhance your grids with sorting arrows.

Click to read more about Enhancing The WebGrid With Sort Arrows ...

Viewed 19775 times

1 Comment for this item

Inline Editing With The WebGrid

Tuesday, November 13, 2012 10:37 AM

jQuery ASP.NET Web Pages WebMatrix Razor WebGrid

Unlike the Web Forms GridView control, the Web Pages WebGrid doesn't offer anything by way of inline editing capability. This article looks at one approach to solving that requirement through the addition of a sprinkling of jQuery.

Click to read more about Inline Editing With The WebGrid ...

Viewed 32775 times

23 Comments for this item

Cleaner Conditional HTML Attributes In Razor Web Pages

Tuesday, October 23, 2012 9:27 PM

ASP.NET Web Pages WebMatrix Razor

Every so often, you will want to conditionally render HTML attributes or their values within your Razor Web Pages based on the outcome of some runtime logic. Often, the logic required to manage this can become messy and lead to unnecessary spaghetti code. This article explores a few common scenarios and provides some solutions, as well as introducing a nice new feature that was released as part of Razor v 2.0.

Click to read more about Cleaner Conditional HTML Attributes In Razor Web Pages ...

Viewed 31498 times

5 Comments for this item

The SimpleMembershipProvider, Secure Passwords And The Crypto Helper

Thursday, September 27, 2012 1:39 PM

ASP.NET MVC ASP.NET Web Pages WebMatrix

Some people have questioned the security of the ASP.NET SimpleMembershipProvider's storage of passwords. The cause for concern seems to stem from the fact that the PasswordSalt field in the standard membership table is unused by the SimpleMembershipProvider, whereas it is used by, for example, SqlMembershipProvider. So what is the PasswordSalt field, and why should the fact that it isn't used raise an eyebrow?

Click to read more about The SimpleMembershipProvider, Secure Passwords And The Crypto Helper ...

Viewed 23406 times

6 Comments for this item

HTML5 Form Helpers For WebMatrix

Thursday, September 20, 2012 2:56 PM

Extension Method ASP.NET Web Pages WebMatrix HTML5

It's an odd thing: WebMatrix 2 is lauded for its support of HTML5, but the Web Pages framework doesn't include any helpers for the new HTML5 form input types such as email or color. It's fair to say that support among browsers for the new inputs is patchy at the moment, but with barely a week flying past without a new version of one or other browser being released, it won't take long for that to change. So in the meantime, if you prefer to use helpers, you have to write your own for rendering HTML5 forms.

Click to read more about HTML5 Form Helpers For WebMatrix ...

Viewed 26873 times

5 Comments for this item

Cannot use a lambda expression as an argument to a dynamically dispatched operation

Tuesday, September 18, 2012 8:08 AM

LINQ ASP.NET MVC ASP.NET Web Pages WebMatrix

Since the introduction of the Web Pages framework, ASP.NET has been making use of the dynamic type introduced in C# 4.0. Along with that comes some new error messages which at first glance don't make a lot of sense - mainly because they are unexpected. I have already looked at how dynamics do not support extension methods, and a recent question in the ASP.NET forums illustrated another way in which the dynamic type can catch you out.

Click to read more about Cannot use a lambda expression as an argument to a dynamically dispatched operation ...

Viewed 24077 times

1 Comment for this item

Optimising ASP.NET Web Pages Sites - Bundling And Minification

Saturday, September 15, 2012 5:05 PM

ASP.NET Web Pages WebMatrix

ASP.NET 4.5 saw the introduction of new features for improving the performance of web sites. Delivered within a new library called System.Web.Optimization, bundling and minification enables you to combine multiple JavaScript or CSS files into one bundle, and to minify them thereby reducing the number of HTTP requests that browsers have to make, reducing the size of the files, and improving performance of the site overall, especially over slower (read 3G) networks.

Click to read more about Optimising ASP.NET Web Pages Sites - Bundling And Minification ...

Viewed 34148 times

3 Comments for this item

WebMatrix - jQuery Cascading Dropdown Lists

Saturday, September 8, 2012 9:56 AM

jQuery ASP.NET Web Pages WebMatrix

I have looked at cascading dropdown lists with WebMatrix previously, but the approach I featured demonstrated the use of jQuery Templates. At the time, the jQuery Templates project looked promising, but since then, the jQuery team have decided not to take them beyond beta stage. So the reason for this article is to illustrate a more "traditional" jQuery approach to managing cascading dropdown lists when developing ASP.NET Web Pages using WebMatrix.

Click to read more about WebMatrix - jQuery Cascading Dropdown Lists ...

Viewed 18323 times

6 Comments for this item