Items By Type: Tutorial

SignalR And Knockout In ASP.NET Web Pages Using WebMatrix

Thursday, December 27, 2012 8:17 PM

ASP.NET Web Pages WebMatrix Razor

SignalR is a library that simplifies the creation and management of persistent connections between web servers and clients. This facilitates the development of applications that can display updates to data held on the server in real-time. Chat applications are the most obvious beneficiaries of this technology, but line-of-business applications that need to report availability to users can benefit too. Here, I look at extending the canonical SignalR chat example to incorporate a "who's typing" feature, and I also extend my previous Knockout example to use SignalR.

Click to read more about SignalR And Knockout In ASP.NET Web Pages Using WebMatrix ...

Viewed 47006 times

4 Comments for this item

Exporting The Razor WebGrid To PDF Using iTextSharp

Thursday, December 20, 2012 1:31 PM

iTextSharp ASP.NET Web Pages WebMatrix Razor WebGrid

This article looks at how you can provide your users with the ability to export the contents of a Razor Web Pages WebGrid to a PDF file using the popular free PDF library, iTextSharp.

Click to read more about Exporting The Razor WebGrid To PDF Using iTextSharp ...

Viewed 27945 times

9 Comments for this item

Exporting The Razor WebGrid To Excel

Monday, December 17, 2012 8:17 PM

ASP.NET Web Pages WebMatrix Razor WebGrid

This article looks at how you can provide your users with the ability to export the contents of a Razor Web Pages WebGrid to an Excel file.

Click to read more about Exporting The Razor WebGrid To Excel ...

Viewed 23862 times

2 Comments for this item

Enhancing The WebGrid With Sort Arrows

Friday, December 14, 2012 7:24 PM

jQuery ASP.NET Web Pages WebMatrix Razor WebGrid

The Web Pages WebGrid offers sorting capability out of the box. However, it's not always obvious to the user on which column the grid data is being sorted at any one time, nor the direction in which it is being sorted. The convention is to provide arrows in the column header to act as a clear visual cue. This article looks at a three ways in which you can enhance your grids with sorting arrows.

Click to read more about Enhancing The WebGrid With Sort Arrows ...

Viewed 28136 times

3 Comments for this item

Inline Editing With The WebGrid

Tuesday, November 13, 2012 10:37 AM

jQuery ASP.NET Web Pages WebMatrix Razor WebGrid

Unlike the Web Forms GridView control, the Web Pages WebGrid doesn't offer anything by way of inline editing capability. This article looks at one approach to solving that requirement through the addition of a sprinkling of jQuery.

Click to read more about Inline Editing With The WebGrid ...

Viewed 48855 times

31 Comments for this item

Cleaner Conditional HTML Attributes In Razor Web Pages

Tuesday, October 23, 2012 9:27 PM

ASP.NET Web Pages WebMatrix Razor

Every so often, you will want to conditionally render HTML attributes or their values within your Razor Web Pages based on the outcome of some runtime logic. Often, the logic required to manage this can become messy and lead to unnecessary spaghetti code. This article explores a few common scenarios and provides some solutions, as well as introducing a nice new feature that was released as part of Razor v 2.0.

Click to read more about Cleaner Conditional HTML Attributes In Razor Web Pages ...

Viewed 59960 times

7 Comments for this item

The SimpleMembershipProvider, Secure Passwords And The Crypto Helper

Thursday, September 27, 2012 1:39 PM

ASP.NET MVC ASP.NET Web Pages WebMatrix

Some people have questioned the security of the ASP.NET SimpleMembershipProvider's storage of passwords. The cause for concern seems to stem from the fact that the PasswordSalt field in the standard membership table is unused by the SimpleMembershipProvider, whereas it is used by, for example, SqlMembershipProvider. So what is the PasswordSalt field, and why should the fact that it isn't used raise an eyebrow?

Click to read more about The SimpleMembershipProvider, Secure Passwords And The Crypto Helper ...

Viewed 29299 times

6 Comments for this item

HTML5 Form Helpers For WebMatrix

Thursday, September 20, 2012 2:56 PM

Extension Method ASP.NET Web Pages WebMatrix HTML5

It's an odd thing: WebMatrix 2 is lauded for its support of HTML5, but the Web Pages framework doesn't include any helpers for the new HTML5 form input types such as email or color. It's fair to say that support among browsers for the new inputs is patchy at the moment, but with barely a week flying past without a new version of one or other browser being released, it won't take long for that to change. So in the meantime, if you prefer to use helpers, you have to write your own for rendering HTML5 forms.

Click to read more about HTML5 Form Helpers For WebMatrix ...

Viewed 32334 times

5 Comments for this item

Cannot use a lambda expression as an argument to a dynamically dispatched operation

Tuesday, September 18, 2012 8:08 AM

LINQ ASP.NET MVC ASP.NET Web Pages WebMatrix

Since the introduction of the Web Pages framework, ASP.NET has been making use of the dynamic type introduced in C# 4.0. Along with that comes some new error messages which at first glance don't make a lot of sense - mainly because they are unexpected. I have already looked at how dynamics do not support extension methods, and a recent question in the ASP.NET forums illustrated another way in which the dynamic type can catch you out.

Click to read more about Cannot use a lambda expression as an argument to a dynamically dispatched operation ...

Viewed 31600 times

1 Comment for this item

Optimising ASP.NET Web Pages Sites - Bundling And Minification

Saturday, September 15, 2012 5:05 PM

ASP.NET Web Pages WebMatrix

ASP.NET 4.5 saw the introduction of new features for improving the performance of web sites. Delivered within a new library called System.Web.Optimization, bundling and minification enables you to combine multiple JavaScript or CSS files into one bundle, and to minify them thereby reducing the number of HTTP requests that browsers have to make, reducing the size of the files, and improving performance of the site overall, especially over slower (read 3G) networks.

Click to read more about Optimising ASP.NET Web Pages Sites - Bundling And Minification ...

Viewed 53031 times

9 Comments for this item

WebMatrix - jQuery Cascading Dropdown Lists

Saturday, September 8, 2012 9:56 AM

jQuery ASP.NET Web Pages WebMatrix

I have looked at cascading dropdown lists with WebMatrix previously, but the approach I featured demonstrated the use of jQuery Templates. At the time, the jQuery Templates project looked promising, but since then, the jQuery team have decided not to take them beyond beta stage. So the reason for this article is to illustrate a more "traditional" jQuery approach to managing cascading dropdown lists when developing ASP.NET Web Pages using WebMatrix.

Click to read more about WebMatrix - jQuery Cascading Dropdown Lists ...

Viewed 22167 times

9 Comments for this item

ASP.NET Web Pages - Creating Custom Validators

Friday, August 31, 2012 2:33 PM

ASP.NET Web Pages WebMatrix

Version 2 of the Web Pages framework includes a new validation framework. Included are a number of specific validators that cover common scenarios such as validating for presence, data type or range. It may be however, that you want to create your own custom validator to test for something that isn't covered by the existing validators, or to combine multiple tests in one composite validator. Fortunately, the Web Pages team have made the validation system extensible so that you can create your own validators.

Click to read more about ASP.NET Web Pages - Creating Custom Validators ...

Viewed 20851 times

11 Comments for this item

Working With Entity Framework Code First And JSON In ASP.NET Web Pages

Sunday, July 22, 2012 8:46 PM

Entity Framework ASP.NET Web Pages WebMatrix

If you want to build AJAX powered rich client interfaces with ASP.NET Web Pages, you will work with JSON - a lot. You might also be attracted to the Entity Framework for your data access technology. There are some special considerations to take account of when serialising Entity Framework objects to JSON for use in Web Pages applications. This article explores some of the issues you will encounter through the example of a simple To Do list manager.

Click to read more about Working With Entity Framework Code First And JSON In ASP.NET Web Pages ...

Viewed 95459 times

4 Comments for this item

Transferring Data Between ASP.NET Web Pages

Saturday, July 14, 2012 8:24 PM

ASP.NET Web Pages WebMatrix

There are a huge number of articles and blog posts on persisting data between user requests in ASP.NET. However, the ASP.NET Web Pages framework introduces a couple of additional mechanisms so this article explores those, as well as reviewing some of the standard approaches already available to Web Pages developers from other parts of the ASP.NET framework.

Click to read more about Transferring Data Between ASP.NET Web Pages ...

Viewed 148099 times

17 Comments for this item

Validation In Razor Web Pages 2

Thursday, June 14, 2012 12:47 PM

jQuery ASP.NET Web Pages WebMatrix Razor

The new release of ASP.NET Web Pages - version 2 - doesn't include many obvious changes, but the most significant one is an enhanced Validation system. A couple of new classes have been introduced, and Web Pages validation now works with the MVC Unobtrusive jQuery validation library. This article explores the new validation system and sees what it brings to the party.

Click to read more about Validation In Razor Web Pages 2 ...

Viewed 108623 times

19 Comments for this item

Recent Comments

sandeep 8/28/2015 7:03 AM
In response to 7 C# 6.0 Features That Every ASP.NET Developer Should Know About
very good article, i like it........keep writing such quality article in future. thx Mike....

Hassan, MVC Learner 8/28/2015 6:37 AM
In response to Get The Drop On ASP.NET MVC DropDownLists
Great Help, simple, great and patiently explained article !...

Anvesh 8/28/2015 12:39 AM
In response to ASP.NET MVC DropDownLists - Multiple Selection and Enum Support
what if we are taking postback values from FormCollections instead of an array int[] category. How...

Ben 8/27/2015 10:50 PM
In response to Simple File Download Protection with ASP.NET
Is it possible to setup your project to publish files to outside of your root directory? I would to...

Fred 8/26/2015 12:50 AM
In response to WebMatrix Opens Wrong Version Of Visual Studio
I enjoyed many of your tutorials but the problem is none of the tutorials are combined like most be....

Muhammad Ashikuzzaman 8/25/2015 2:48 PM
In response to Managing Checkboxes And Radios In ASP.NET Razor Web Pages
That's a very good tips for razor...

Sergey 8/25/2015 8:32 AM
In response to More Flexible Routing For ASP.NET Web Pages
Hi. How I can set up my site to get urldata from link for default page? site.com/default/1-...

Tony Gray 8/25/2015 6:27 AM
In response to Adding Validation
Hi Mike, Really helpful article and series. Thanks. Small typo in 4th paragraph you have so...

amanda n 8/25/2015 12:38 AM
In response to Solving the Operation Must Use An Updateable Query error
Thank you very much. I'm a uni student and while solving coding problems is usually enjoyable and me...

salman 8/23/2015 9:25 AM
In response to How To Send Email In ASP.NET MVC
thanks ......