Monday, May 18, 2015 1:45 PM
TagHelpers is one of the new features introduced in MVC 6, part of ASP.NET 5. They are used for generating reusable pieces of UI that require some kind of server-side processing. I took a closer look at the built-in collection of TagHelpers in my last article, Introducing TagHelpers in ASP.NET MVC 6. This article shows how to create your own custom TagHelpers. It will illustrate two ways of doing so: through parsing custom attributes; and by binding properties on the TagHelper.
Click to read more about Custom TagHelpers in ASP.NET MVC 6 ...
Viewed 585 times
Monday, May 11, 2015 1:17 PM
TagHelpers is one of the new features introduced in MVC 6. The TagHelper's role is similar to the one played in previous versions of ASP.NET MVC by HtmlHelpers: they are designed to simplify the work required to author views that need to respond dynamically to the data provided to them. However, the way in which they work and their impact on view design is very different to HtmlHelpers.
Click to read more about Introducing TagHelpers in ASP.NET MVC 6 ...
Viewed 2133 times
Thursday, April 30, 2015 1:26 PM
Hardly a week goes by without someone asking a question in the ASP.NET forums about parsing HTML for one purpose or another. Mostly, the questions are couched in terms of 'finding values' or similar, prompting responses from the community that recommend one regular expression pattern or another, treating HTML as a string of text with no structure or rules. In fact, HTML is a structured document format with a set of very clearly defined rules, which means that it can easily be parsed given the right tool. My favourite tool for parsing HTML is the HtmlAgilityPack.
Click to read more about Using the HtmlAgilityPack to parse HTML in ASP.NET ...
Viewed 1627 times
Thursday, April 23, 2015 1:19 PM
This post explores the options available to you when your application requirements include managing and storing time using the Entity Framework. Specifically, I am thinking of durations of time, such as the time required to complete some kind of task, not the time part of a date. Relevant examples might include storing the length of a movie, or the preparation time required for a recipe.
Click to read more about Entity Framework 6 Recipe: Storing And Managing Time ...
Viewed 2245 times
Tuesday, April 14, 2015 1:25 PM
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
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 8120 times
Tuesday, April 7, 2015 1:39 PM
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 14525 times
Tuesday, March 31, 2015 1:22 PM
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 12291 times
Tuesday, March 24, 2015 1:21 PM
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 7390 times
Monday, March 16, 2015 1:20 PM
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 7371 times
Tuesday, March 10, 2015 1:07 PM
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 6150 times
Tuesday, March 3, 2015 1:26 PM
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 18829 times
Tuesday, February 24, 2015 2:51 PM
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 7824 times
Wednesday, February 18, 2015 1:16 PM
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 7555 times
Monday, February 16, 2015 1:33 PM
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 8275 times
Tuesday, February 3, 2015 1:26 PM
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 11438 times