09 May 2014 08:41
This tutorial is the first in a series of a Visual Basic versions of the Introduction to ASP.NET MVC 5 tutorials published on the www.asp.net site. The original series, produced by Scott Guthrie (twitter @scottgu ), Scott Hanselman (twitter: @shanselman ), and Rick Anderson ( @RickAndMSFT ) was written using the C# language. My versions keep as close to the originals as possible, changing only the coding language. The narrative text is largely unchanged from the original and is used with permission from Microsoft.
09 April 2014 13:45
I managed to generate this error twice within a few days while working with the Entity Framework and SQL Server 2012. I had to resort to searching for a resolution on both occasions so I'm posting about it to sear the cause and solution into my brain.
10 March 2014 13:23
This is the third in a series of articles that explore how to migrate classic ASP web sites to the ASP.NET Web Pages framework. I covered Razor syntax and data access in the previous articles. This article shows how to deal with reusable code that typically inhabits include files in classic ASP.
03 March 2014 13:26
The first article in this series explored the differences (and similarities) between classic ASP inline syntax and Razor syntax, the templating technology behind ASP.NET Razor Web Pages. The work required so far to port intermixed HTML and simple conditional and selection statements across from classic ASP to Razor didn't require a lot of effort. That is about to change in this article as I look at data access.
24 February 2014 13:25
You have a classic ASP application that needs migrating to ASP.NET. You are comfortable working with classic ASP. but ASP.NET is fairly new to you. So what do you do? This article is the first in a series that looks at your options and proposes an approach to the migration that follows the path of least resistance.
04 February 2014 19:39
There are a number of ways that you can maximise code re-use within a Razor Web Pages site: Layout pages, helpers, functions and so on. As you build more sites, you soon find that you are repeating code between them. You might have a collection of custom utility functions and extension methods, for example that you find yourself copying and pasting across sites. Over time, this will become a maintenance nightmare as different versions of the methods live in different sites. This article shows how to solve that problem easily by creating a library that can be shared across multiple sites.
23 January 2014 08:10
The Razor WebGrid isn't just used for displaying data. I have already looked at how to edit data inline within the WebGrid, so this article looks at how to add new rows of data. within a rendered grid.
18 December 2013 11:24
Cross Site Scripting (XSS) attacks are the third on the Open Web Application Security Project's (OWASP) 2013 list of security vulnerabilities. This article looks at the defence mechanisms built into ASP.NET that protect against such attacks and how you can disable those defences in ASP.NET Razor Web Pages in a safe manner when you need to.
29 November 2013 15:22
The Web Pages Starter Site template provides a useful starting point for developing a Razor Web Pages site that includes membership. But it doesn't include any mechanism for preventing duplicate user names. This article offers one solution to the problem that uses jQuery.
06 November 2013 19:38
There have been a few questions recently about what you can post to the server using jQuery AJAX and where to find whatever you posted. This article looks at using the jQuery ajax method in ASP.NET Razor Web Pages and explores how different options have different results.
28 October 2013 20:04
jQuery Sortables offer a way to specify the order of a collection of items through an easy drag and drop interface. I have just been working on the next release of Web Pages CMS and am in the process of implementing Sortables for managing the display order of menu items. This article looks at how they can be used in Razor Web Pages and shows one way of saving the resulting order to a database.
14 October 2013 21:04
Checkboxes and radio buttons cause more confusion than any other form control in ASP.NET Razor Web Pages. This article takes an in depth look at them and tackles the most frequently asked questions that they generate.
28 August 2013 20:14
Entity Framework Code First Migrations enable changes to your model to be propagated to your database through code. Prior to the introduction of migrations, changes to the model resulted in the database being recreated from scratch with attendant loss of data. During development, this may not cause too many problems, but once the database has been deployed into production, it's another story. Migrations solve the problem in that changes are applied to the database schema without loss of data.
07 August 2013 19:34
The default authentication mechanism built into ASP.NET Web Pages site templates is Forms Authentication via the SimpleMembershipProvider, which is designed to enable authentication of users against a database. This requires the user to know their user name and password, and to enter those whenever they want to log in to access restricted areas within a site. If you are using the ASP.NET Web Pages framework to build an Intranet site that will be hosted within your own corporate network (i.e. client machines and web server are in the same domain), you can use Integrated Windows Authentication instead which simplifies authentication dramatically.
01 August 2013 15:32
Most successful e-commerce sites implement a mechanism that draws the customer's attention to other products that might be of interest to them. These products are selected on the basis that shoppers who purchased the item currently being viewed by the customer also bought other products. This article looks at a away of implementing this kind of facility in an ASP.NET Web Pages site.