25 December 2011 11:27
A nugget that has remained partially hidden from view within the Web Pages framework is the HtmlHelper class. Parts of this class peek out in the template sites provided in WebMatrix where validation is performed and related messages displayed, but a vast range of methods designed for rendering form inputs are often overlooked in tutorials, blog articles and books (mine included). This article provides an overview of Web Pages HTML Helpers, and digs into one or two in more detail.
10 October 2011 21:35
Globalization is the process of preparing your site so that it is accessible to as wide an audience as possible. This is largely achieved by presenting content in the native language of the visitor. This article explores how you can approach this task within the ASP.NET Web Pages framework.
05 September 2011 17:27
The existing data access story for WebMatrix is the Database Helper. Microsoft's recommended data access technology going forward is the Entity Framework (EF). This article explores how to use the Code First capability offered by EF within an ASP.NET Web Pages application.
28 August 2011 22:46
A problem inherent in the existing version of the WebGrid is that it is not very efficient when it comes to paging data out of the box. If you have 10,000 rows of data, and you want to display 10 rows per page, all 10,000 rows are retrieved from the database for each page. The grid works out how to only show the current 10, and wastes the other 9,990 rows. That's a fair sized overhead on each page. Ideally, you should only retrieve the data you need for each page. This article examines how you can do that with the existing WebGrid and a SQL CE database, while still maintaining sorting capabilities.
27 August 2011 16:57
A number of people have run into problems when trying to combine a search or filter form, and a WebGrid. The main issue that arises is when paging or sorting the search result or a filtered subset of it. Here, I look at the cause of the problem and what you can do about it.
23 August 2011 21:13
This snippet is one in a series showing how to use jQuery to enhance the behaviour of a Web Pages WebGrid. This example shows how to maintain scroll position on the page when paging or sorting the WebGrid.
23 August 2011 11:23
This snippet is one in a series showing how to use jQuery to enhance the behaviour of a Web Pages WebGrid. This example shows how to make an entire row clickable so that the user is taken to another page that displays details of the selected row.
16 August 2011 09:23
There are a number of autocomplete solutions for jQuery, including the widget that comes as part of the jQuery UI library. This article looks at incorporating the jQuery UI Autocomplete widget into a Razor-based ASP.NET Web Pages site.
06 August 2011 17:33
This article continues on from one I wrote a while ago, showing how to use jQuery to create a data entry form in conjunction with the WebGrid. The original article prompted a number of requests to show how to extend the example to provide editing functions, and now I have found some time to answer those requests.
12 April 2011 12:36
I've previously looked at how to generate RSS feeds for both Web Forms and MVC using a variety of techniques, so it is only right that I look at a couple of ways to do this in Web Pages - the Razor based web development model supported by WebMatrix.
20 March 2011 09:42
This is another post which was inspired by a recent question in the ASP.NET forums, when someone asked what the difference is between @functions and @helpers in ASP.NET Web Pages. Here, I look at both of these contructs and explain what they are, how they are different, and how each should be used appropriately.
13 January 2011 14:08
The WebGrid helper, introduced via ASP.NET Web Pages, provides a means for displaying tabular data easily. This article examines how to enable selection within the WebGrid at row level.
04 January 2011 22:20
20 December 2010 12:56
There is a certain amount of debate surrounding the importance of friendly URLs in terms of Search Engine Optimisation and improving your ranking. One thing is certain - having friendly URLs helps users to identify whether the content at the end of a link to your site is likely to be relevant to them or not. This article examines how you can make use of the built-in support for Routing provided by ASP.NET Web Pages to not only create friendly URLs, but to work with parameters as well.
17 December 2010 13:27
Razor Layout pages are the equivalent to MasterPages in ASP.NET Web Forms and the Web Forms View Engine within ASP.NET MVC. Just as it is possible to nest MasterPages, it is also possible to nest Razor Layout pages. This article explores the process required to achieve nesting of Layout pages using the Razor View Engine in MVC 3, or WebMatrix Web Pages sites.