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

Latest Entries

7 C# 6.0 Features That Every ASP.NET Developer Should Know About

Tuesday, April 14, 2015 1:25 PM

C# ASP.NET 5

Visual Studio 2015 introduces a completely new version of ASP.NET, but it also includes version 6 of the C# language. Previous new versions of C# have heralded substantial changes like the introduction of async and await in version 5, dynamic in version 4, LINQ in version 3 and so on. There are no major feature changes or introductions in version 6, but there are a number of syntactical improvements that you are likely to use on a daily basis. Here's a rundown of them.

Click to read more about 7 C# 6.0 Features That Every ASP.NET Developer Should Know About ...

Viewed 1569 times

2 Comments for this item

Sessions in ASP.NET 5

Tuesday, April 7, 2015 1:39 PM

ASP.NET MVC ASP.NET 5

ASP.NET 5 is being designed so that your application is only dependent on features that it actually needs. This is achieved in large part by creating a composable framework, where the developer opts in to non-essential features - a number of which are baked in to traditional versions of ASP.NET. One of the features that this applies to is Session State. This article looks at how to obtain and use session state in ASP.NET 5 applications.

Click to read more about Sessions in ASP.NET 5 ...

Viewed 7949 times

8 Comments for this item

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

Tuesday, March 31, 2015 1:22 PM

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 8347 times

7 Comments for this item

How To Send Email In ASP.NET MVC

Tuesday, March 24, 2015 1:21 PM

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 2978 times

4 Comments for this item

ASP.NET 5 By Numbers

Monday, March 16, 2015 1:20 PM

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 5552 times

1 Comment for this item

Error Handling in ASP.NET Razor Web Pages

Tuesday, March 10, 2015 1:07 PM

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 4208 times

0 Comments for this item

ASP.NET MVC DropDownLists - Multiple Selection and Enum Support

Tuesday, March 3, 2015 1:26 PM

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 10291 times

5 Comments for this item

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

Tuesday, February 24, 2015 2:51 PM

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 5436 times

2 Comments for this item

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

Wednesday, February 18, 2015 1:16 PM

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 5788 times

0 Comments for this item

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

Monday, February 16, 2015 1:33 PM

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 6079 times

2 Comments for this item

Integrating Web API with ASP.NET Razor Web Pages

Tuesday, February 3, 2015 1:26 PM

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 8110 times

5 Comments for this item

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

Tuesday, January 27, 2015 1:26 PM

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 6275 times

1 Comment for this item

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

Tuesday, January 27, 2015 1:19 PM

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 22943 times

12 Comments for this item

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

Thursday, January 22, 2015 1:54 PM

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 8689 times

4 Comments for this item

Entity Framework 6 Recipe - Grouping By Year And Month

Monday, January 12, 2015 8:38 PM

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 6 Recipe - Grouping By Year And Month ...

Viewed 9143 times

1 Comment for this item

Recent Comments

kaleem 4/16/2015 9:14 AM
In response to ASP.NET MVC, Entity Framework, One-to-Many and Many-to-Many INSERTS
hi this is very helpful ASP.NET MVC, Entity Framework, One-to-Many and Many-to-Many INSERTS if to...

cranston mason 4/16/2015 8:49 AM
In response to Managing Checkboxes And Radios In ASP.NET Razor Web Pages
How do you include a checkbox at the View module and send its values to controller to be processed?...

vamsi 4/15/2015 5:40 AM
In response to Sessions in ASP.NET 5
good article...

James Chaney 4/14/2015 8:44 PM
In response to 7 C# 6.0 Features That Every ASP.NET Developer Should Know About
Question on #5 - I don't see where this gets you out of a NullReferenceException if returns null is...

Grey 4/14/2015 6:09 PM
In response to Getting the identity of the most recently added record
Nice work....

Anh Huynh 4/14/2015 3:36 PM
In response to Create PDFs in ASP.NET - getting started with iTextSharp
I was successfully create and display PDF file from my localhost but when I move the aspx to the I...

Hisham Abdullah Bin Ateya 4/14/2015 7:00 AM
In response to Sessions in ASP.NET 5
Thanks Mike for sharing this article. George it will be nice if we let the web developers implement...

CTR 4/14/2015 6:39 AM
In response to Integrating Web API with ASP.NET Razor Web Pages
Thanks Mike, new to web pages. learning a lot from your posts, Making Ajax calls to Web API extend...

Bayu Angkasa 4/13/2015 11:27 AM
In response to The Difference Between @Helpers and @Functions In WebMatrix
Four years after you wrote it, I still find out how lucky I am to read your posts ... Thank you Mike...

abedon 4/10/2015 9:17 PM
In response to ASP.NET 5 Middleware, Or Where Has My HttpModule Gone?
I feel the title of this article is not that felicitous. ASP.NET 5 is built of top of the concept...