Sunday, March 20, 2011 9:42 AM
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.
Viewed 48398 times
Saturday, March 5, 2011 10:46 PM
When WebMatrix was originally launched, it spurred a lot of activity from people who do not like seeing raw SQL statements in code files, or who perceived a problem working with dynamic objects. Some of these people threw their hands up in horror and tweeted or blogged their displeasure, while others felt the urge to do something about the "problem" as they saw it, and a number of open source data access projects have resulted. I've had a quick look at three projects to see what they might bring to the party.
Viewed 37485 times
Friday, January 14, 2011 11:57 PM
WebMatrix includes a number of pre-built templates that you can use as a basis for developing your site, but wouldn't it be great if you could add new ones? Well, there is a way to do so, and this article looks at the steps required.
Viewed 21710 times
Thursday, January 13, 2011 2:08 PM
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.
Viewed 24967 times
Tuesday, January 4, 2011 10:20 PM
Viewed 30122 times
Monday, December 20, 2010 12:56 PM
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.
Viewed 34962 times
Friday, December 17, 2010 1:27 PM
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.
Viewed 121238 times
Sunday, December 12, 2010 9:52 PM
Viewed 42592 times
Sunday, October 17, 2010 9:06 AM
My original JCrop article which looked at cropping uploaded images in ASP.NET has proven to be the most popular coding article I've ever written, with more views and comments than any other. Revisiting JCrop in the context of Web Pages gives me the opportunity to have a look at the WebImage helper, and see how that might make uploading and cropping images easier.
Viewed 12320 times
Friday, October 15, 2010 6:51 PM
Viewed 28868 times
Sunday, October 10, 2010 8:04 PM
Your Web Pages site is under threat. There are people out there who want to break into restricted areas, download files they shouldn't have access to, mess up your database and steal your passwords. Worse still, they want to use your application as a gateway to the web server so that they can take full control over it. This article examines those threats and how you can protect your application against them.
Viewed 30663 times
Friday, October 8, 2010 7:29 PM
WebMatrix Beta 2 was released a few days ago, and introduced a number of breaking changes which will affect the downloadable samples in my previous articles. I'm going to update the articles and their downloads when I can, but in the meantime, here are the most important changes introduced within the newer Beta release.
Viewed 6266 times
Saturday, September 11, 2010 9:35 AM
There are times when you want to query a database for records matching a range of values, but you do not know what those values are, or even how many there are at design time. You could dynamically build your WHERE clause with multiple ORs, or you can use the SQL IN clause - except that the current database helpers in WebMatrix don't make this easy. It's about time that was fixed....
Viewed 18287 times
Tuesday, August 10, 2010 5:23 PM
Even though WebMatrix is still in its first Beta, there have been a few requests in forums already for examples illustrating how to create Web Pages forms powered by AJAX. Building on previous articles, I thought I'd put together a little sample that shows how to do this to add a record to a database using jQuery. Here's how it's done.
Viewed 49869 times
Sunday, August 8, 2010 9:33 AM
One of the most useful helpers provided by ASP.NET Web Pages via WebMatrix is likely to be the WebGrid, which is designed for displaying tabular data. Still in Beta 1, documentation is sparse, so here's a more detailed look the WebGrid Helper.
Viewed 62801 times