Items By Type: Tutorial

Using The Themes Helper In Razor Web Pages

Monday, January 2, 2012 6:31 PM

ASP.NET Web Pages WebMatrix Razor

Web site skinning is a concept where by a web application user can personalise their experience, by choosing from a selection of prepared themes or skins. Each theme or skin might offer a different design, or content, or both. ASP.NET Web Forms has included a comprehensive Themes framework since version 2.0. WebMatrix developers can find Themes management functionality in the ASP.NET Web Helpers Library package available through the Package Manager. This article looks at how the Themes helper works.

Click to read more about Using The Themes Helper In Razor Web Pages ...

Viewed 29609 times

10 Comments for this item

Building A Razor Web Pages Site With Database First And Entity Framework

Friday, December 30, 2011 3:25 PM

Entity Framework ASP.NET Web Pages WebMatrix Razor

Since I published an item covering Code First development with Entity Framework and WebMatrix, I have had a few requests to provide a guide to working with the Entity Framework from a database first point of view. This post answers those requests and provides a step by step guide to getting up and running with a WebMatrix web site based on the Northwind sample database that comes with SQL Server CE 4.0.

Click to read more about Building A Razor Web Pages Site With Database First And Entity Framework ...

Viewed 36523 times

7 Comments for this item

HTML Helpers For Forms In Razor Web Pages

Sunday, December 25, 2011 11:27 AM

HTML ASP.NET Web Pages WebMatrix Razor

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.

Click to read more about HTML Helpers For Forms In Razor Web Pages ...

Viewed 121725 times

8 Comments for this item

Globalization And Localization With Razor Web Pages

Monday, October 10, 2011 9:35 PM

ASP.NET Web Pages WebMatrix Razor

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.

Click to read more about Globalization And Localization With Razor Web Pages ...

Viewed 73572 times

10 Comments for this item

Entity Framework Code First Development With WebMatrix

Monday, September 5, 2011 5:27 PM

Entity Framework ASP.NET Web Pages WebMatrix Razor

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.

Click to read more about Entity Framework Code First Development With WebMatrix ...

Viewed 32919 times

11 Comments for this item

The WebGrid - Efficient Paging And Sorting With SQL CE 4.0

Sunday, August 28, 2011 10:46 PM

ASP.NET Web Pages WebMatrix Razor WebGrid

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.

Click to read more about The WebGrid - Efficient Paging And Sorting With SQL CE 4.0 ...

Viewed 16329 times

9 Comments for this item

jQuery Autocomplete with Razor Web Pages and a SQL CE Database

Tuesday, August 16, 2011 9:23 AM

jQuery ASP.NET Web Pages WebMatrix Razor

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.

Click to read more about jQuery Autocomplete with Razor Web Pages and a SQL CE Database ...

Viewed 27386 times

8 Comments for this item

WebMatrix and jQuery Forms Part 2 - Editing Data

Saturday, August 6, 2011 5:33 PM

jQuery ASP.NET Web Pages WebMatrix Razor WebGrid

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.

Click to read more about WebMatrix and jQuery Forms Part 2 - Editing Data ...

Viewed 20181 times

5 Comments for this item

Generating RSS and ATOM Feeds In WebMatrix

Tuesday, April 12, 2011 12:36 PM

ASP.NET Web Pages WebMatrix Razor

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.

Click to read more about Generating RSS and ATOM Feeds In WebMatrix ...

Viewed 17112 times

3 Comments for this item

The Difference Between @Helpers and @Functions In WebMatrix

Sunday, March 20, 2011 9:42 AM

ASP.NET Web Pages WebMatrix Razor

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.

Click to read more about The Difference Between @Helpers and @Functions In WebMatrix ...

Viewed 58129 times

7 Comments for this item

Data Access Choices For WebMatrix

Saturday, March 5, 2011 10:46 PM

ASP.NET Web Pages WebMatrix

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.

Click to read more about Data Access Choices For WebMatrix ...

Viewed 38908 times

8 Comments for this item

Creating A Custom Template For WebMatrix

Friday, January 14, 2011 11:57 PM

ASP.NET Web Pages WebMatrix

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.

Click to read more about Creating A Custom Template For WebMatrix ...

Viewed 24963 times

2 Comments for this item

The WebGrid Helper - Making Selections

Thursday, January 13, 2011 2:08 PM

ASP.NET Web Pages WebMatrix Razor WebGrid

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.

Click to read more about The WebGrid Helper - Making Selections ...

Viewed 27032 times

6 Comments for this item

Razor, Cascading Select Lists and jQuery Templates - A New Twist

Tuesday, January 4, 2011 10:20 PM

jQuery ASP.NET Web Pages WebMatrix Razor

jQuery Templates enable easy client-side generation of html. When combined with JSON data or other JavaScript objects, jQuery Templates provide a way to create a dynamic data-driven site without any server-side code whatsoever. However, in this article I will look at how they can be used to produce cascading select lists in a Razor Web Pages site.

Click to read more about Razor, Cascading Select Lists and jQuery Templates - A New Twist ...

Viewed 30715 times

4 Comments for this item

WebMatrix - URLs, UrlData and Routing for SEO

Monday, December 20, 2010 12:56 PM

ASP.NET Web Pages WebMatrix Razor

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.

Click to read more about WebMatrix - URLs, UrlData and Routing for SEO ...

Viewed 39483 times

14 Comments for this item

Recent Comments

faysal 3/3/2015 11:46 AM
In response to Inline Editing With The WebGrid
Nice one can you please tell us how we can do ad and delete functionality in this. for e.g if i on...

Fairoze Mohamed Musthafa 3/2/2015 8:33 AM
In response to Date formatting in VBScript
Appreciated !!!!...

mahdi 3/1/2015 10:16 AM
In response to Getting the identity of the most recently added record
Great Article....

Sohrab 2/28/2015 12:53 PM
In response to Displaying One-To-Many Relationships with Nested Repeaters
hi.this was very usefull for me.after spending 6 hours I could find best answer for my alot....

Abolfazl RoshanZamir 2/28/2015 10:36 AM
In response to Date Formatting in C#
very informative... thanks for sharing sir......

Oscar Duran 2/27/2015 2:00 PM
In response to How To Check If A Query Returns Data In ASP.NET Web Pages
Thank you very much Mike, this post has been very useful to me....

lama 2/27/2015 1:46 PM
In response to iTextSharp - Working with Fonts
thanks alot!! is it possible to add line height value to a paragraph ?...

Oded Dror 2/27/2015 5:23 AM
In response to MVC 5 with EF 6 in Visual Basic - Creating an Entity Framework Data Model
Hi there, Where I can find Contoso University Database? Thanks, Oded Dror...

hosein ey 2/25/2015 1:56 PM
In response to ASP.NET MVC 5 with EF 6 - Working With Files
tnx for this article do you think next version of entityframework support's the sql server and ?...

Saywer Ford 2/25/2015 5:15 AM
In response to Optimising ASP.NET Web Pages Sites - Bundling And Minification
Great Article. I did everything right and working fine. How about page specific js files. Lets I...