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

Latest Entries

ASP.NET 5 Middleware, Or Where Has My HttpModule Gone?

31 March 2015 13:22

ASP.NET MVC ASP.NET 5

ASP.NET 5 has been largely rewritten from the ground up, and incorporates some radical changes when compared with previous versions of ASP.NET. One of the biggest changes is in the HTTP Pipeline. This article looks at how those changes impact the design and registration of plug and play components that used to be represented by HttpModules.

Click to read more about ASP.NET 5 Middleware, Or Where Has My HttpModule Gone? ...

Viewed 37958 times

11 Comments for this item

How To Send Email In ASP.NET MVC

24 March 2015 13:21

ASP.NET MVC

This article takes a comprehensive look at the business of generating and sending email from an ASP.NET MVC application. It covers the most common use cases as well as some advanced scenarios. It also explores some of the more common errors that arise from attempting to generate and send email programmatically from an ASP.NET MVC site.

Click to read more about How To Send Email In ASP.NET MVC ...

Viewed 97098 times

49 Comments for this item

ASP.NET 5 By Numbers

16 March 2015 13:20

ASP.NET MVC ASP.NET Web Pages ASP.NET 5

There's a lot of confusion surrounding the numbers relating to the impending release of the next version of ASP.NET. This post takes a look at the main ones and seeks to explain their significance.

Click to read more about ASP.NET 5 By Numbers ...

Viewed 10909 times

4 Comments for this item

Error Handling in ASP.NET Razor Web Pages

10 March 2015 13:07

ASP.NET Web Pages WebMatrix

Bang! An unhandled exception occurred during the execution of the current web request. And that's it - your visitor is met with the yellow screen of death and they are left wondering what they did wrong. You might not even be aware of what's just happened - unless your visitor can find some way of alerting you, oh, and they bother to do so. That's the problem with run time errors; the code worked fine when you ran it on your machine. But then along came a user and they tried to do something you didn't anticipate and broke your site. So what should you do about this?

Click to read more about Error Handling in ASP.NET Razor Web Pages ...

Viewed 13299 times

1 Comment for this item

ASP.NET MVC DropDownLists - Multiple Selection and Enum Support

03 March 2015 13:26

ASP.NET MVC

My original article about Drop Down Lists in ASP.NET MVC has proven to be among the most popular on this site, amassing over a third of a million views since it was published 5 years ago. This article builds on the original by looking at using drop down lists for multiple selections, and the helper that was introduced in MVC 5.1 to support enumerations as a source of select options.

Click to read more about ASP.NET MVC DropDownLists - Multiple Selection and Enum Support ...

Viewed 106648 times

16 Comments for this item

Migrating From Razor Web Pages To ASP.NET MVC 5 - Model Binding And Forms

24 February 2015 14:51

ASP.NET MVC ASP.NET Web Pages

If you have built sites with the ASP.NET Razor Web Pages framework, you might want to look at migrating them to ASP.NET MVC at some point. This tutorial is the last in a series of three that explores how you do that by taking a step by step approach to migrating the WebMatrix Bakery template site to ASP.NET MVC 5. Previous tutorials in the series have looked at the roles of the View and Controller, and the data access and view model aspects of the Model. This final part covers model binding and form posting. A download (c. 24MB) featuring the completed application is available.

Click to read more about Migrating From Razor Web Pages To ASP.NET MVC 5 - Model Binding And Forms ...

Viewed 27799 times

5 Comments for this item

Migrating From Razor Web Pages To ASP.NET MVC 5 - Data Access And View Models

18 February 2015 13:16

ASP.NET MVC Entity Framework ASP.NET Web Pages

If you have built sites with the ASP.NET Razor Web Pages framework, you might want to look at migrating them to ASP.NET MVC at some point. This tutorial is the second in a series of three that explores how you do that by taking a step by step approach to migrating the WebMatrix Bakery template site to ASP.NET MVC 5. Along the way, each of the core parts of MVC are discussed by way of an introduction to the framework. The tutorial is divided into three parts. The first part looked at the roles of the View and Controller. This part looks at the M in MVC, the Model. Specifically, it features data access and view models. The final part will cover model binding and form posting. A download (c. 24MB) featuring the completed application is available.

Click to read more about Migrating From Razor Web Pages To ASP.NET MVC 5 - Data Access And View Models ...

Viewed 12076 times

2 Comments for this item

Migrating From Razor Web Pages To ASP.NET MVC 5 - Views and Controllers

16 February 2015 13:33

ASP.NET MVC ASP.NET Web Pages

If you have built sites with the ASP.NET Razor Web Pages framework, you might want to look at migrating them to ASP.NET MVC at some point. This tutorial is the first in a series of three that explores how you do that by taking a step by step approach to migrating the WebMatrix Bakery template site to ASP.NET MVC 5. Along the way, each of the core parts of MVC will be discussed by way of an introduction to the framework. The tutorial is divided into three parts. This first part looks at the V and C part of MVC - View and Controller. The M or Model is covered in the second and third parts. A download (c. 24MB) featuring the completed application is available.

Click to read more about Migrating From Razor Web Pages To ASP.NET MVC 5 - Views and Controllers ...

Viewed 15983 times

2 Comments for this item

Integrating Web API with ASP.NET Razor Web Pages

03 February 2015 13:26

ASP.NET Web Pages WebMatrix Web API

ASP.NET Web API is the recommended way to build RESTful services over HTTP when using the ASP.NET stack. This article looks at incorporating Web API into an existing Razor Web Pages site, and provides a brief introduction to Web API itself.

Click to read more about Integrating Web API with ASP.NET Razor Web Pages ...

Viewed 42025 times

11 Comments for this item

MVC 5 with EF 6 in Visual Basic - Working With Files

27 January 2015 13:26

VB.Net ASP.NET MVC

This tutorial explores how to upload files in an ASP.NET MVC applications and how to use Entity Framework to store them in a database. It builds on a series of 12 that teach you how to build MVC 5 applications using Entity Framework for data access and Visual Basic. This tutorial does not have a counterpart in the original tutorial series, produced by Tom Dykstra and Rick Anderson ( @RickAndMSFT ) which was written using the C# language. A C# version is available here.

Click to read more about MVC 5 with EF 6 in Visual Basic - Working With Files ...

Viewed 11071 times

2 Comments for this item

ASP.NET MVC 5 with EF 6 - Working With Files

27 January 2015 13:19

ASP.NET MVC

This tutorial explores how to upload files in an ASP.NET MVC application and how to use Entity Framework to store them in a database. It builds on a series of 12 featuring the fictitious Contoso University that teach you how to build MVC 5 applications using Entity Framework for data access. The original tutorial series was produced in C# by Tom Dykstra and Rick Anderson ( @RickAndMSFT ) of Microsoft. This tutorial is coded in C#. As with the previous tutorials, I have produced a version that uses the Visual Basic language. It is available here.

Click to read more about ASP.NET MVC 5 with EF 6 - Working With Files ...

Viewed 159303 times

47 Comments for this item

Usage of the @ (at) sign in ASP.NET

22 January 2015 13:54

C# ASP.NET MVC ASP.NET Web Pages Razor

The number of places where you might use or encounter the @ sign in ASP.NET has grown over the last few years and its exact purpose in all circumstances still seems to cause confusion. Here's an overview of the most common places that it crops up, and guidance on its correct usage.

Click to read more about Usage of the @ (at) sign in ASP.NET ...

Viewed 15247 times

8 Comments for this item

Entity Framework Recipe: Grouping By Year And Month

12 January 2015 20:38

ASP.NET MVC Entity Framework

This is the latest in a series of "EF Recipes" - short articles that show through practical examples how to achieve common tasks with Entity framework and ASP.NET MVC. This particular example looks at grouping data by year and month in MVC 5 with Entity Framework 6. The article is prompted by an email I got from a reader who asked how I generate the "Archives" feature in the right hand panel on each page on this site.

Click to read more about Entity Framework Recipe: Grouping By Year And Month ...

Viewed 26030 times

3 Comments for this item

Entity Framework Recipe: Alphabetical Paging In ASP.NET MVC

29 October 2014 20:53

ASP.NET MVC Entity Framework

This article looks at using the alphabet for paging data in MVC 5 with Entity Framework 6. Where it differs from most existing articles on alphabetical paging is that this article looks at generating paging links from the data instead of the alphabet. It also features a Bootstrap-friendly helper for generating the paging links.

Click to read more about Entity Framework Recipe: Alphabetical Paging In ASP.NET MVC ...

Viewed 23972 times

17 Comments for this item

Entity Framework Recipe: Hierarchical Data Management

24 October 2014 22:20

ASP.NET MVC Entity Framework

This article explores how to use Entity Framework 6 to manage the retrieval and display of hierarchical data such as you might find in a menu system. There are a number of existing items on the Internet that cover the same topic, but most of them seem unnecessarily complex and don't include any information about displaying the data once it has been retrieved.

Click to read more about Entity Framework Recipe: Hierarchical Data Management ...

Viewed 37629 times

9 Comments for this item

Recent Comments

satyabrata 19/06/2016 18:53
In response to Entity Framework Code First and Stored Procedures
Nice article. Thanks. The menu on this website not working in mobile....

satyabrata 16/05/2016 06:28
In response to Implementing SQL Server Full-Text Search In An ASP.NET MVC Web Application With Entity Framework
This is great. Thanks for sharing....

sharey 06/05/2016 13:15
In response to The Best Way To Import Data From Excel To SQL Server via ASP.NET
nice work gentleman.Really helpfull....

Satyabrata Mohapatra 20/04/2016 04:36
In response to The Best Way To Import Data From Excel To SQL Server via ASP.NET
Another beauty !!!! Thanks for sharing....

Avinash Setty 18/04/2016 18:39
In response to Exploring Prefix: A Free ASP.NET Profiling Tool
This tool is awesome! I am very thankful for introducing this tool for us! By any chance, do you is...

flyingtigerfan 17/04/2016 22:56
In response to Request.Form Is Empty When Posting To ASPX Page
Thanks - spent hours trying to figure this out. I'm out of date and trying to start working on some...

Darren Evans 12/04/2016 16:42
In response to Exploring Prefix: A Free ASP.NET Profiling Tool
'Tis indeed a marvellous thing. Just waiting on its appearance for ASP.NET Core. Hopefully not long...

Arkady 03/04/2016 12:09
In response to Request.Form Is Empty When Posting To ASPX Page
Thank you! I spent a day to understand what problem is before I found your article! But I made of...

satyabrata 03/04/2016 03:50
In response to Exploring Prefix: A Free ASP.NET Profiling Tool
This is great!!!!!...

John Dave Bumatay 01/04/2016 02:01
In response to Windows Authentication With ASP.NET Web Pages
+1 ! This worked for me like a magic!~ thank you very much Mike! ;)...