I'm Writing A Book On WebMatrix

4.45 (11 votes)

Yes - it's official! I'm writing a book for Wiley all about Microsoft's new stack for beginner web developers - WebMatrix.

Launched just a few days ago, WebMatrix is already providing a lot of fuel for Tweeters - the vast majority of it very encouraging and positive, and some of it, well... uneducated, let's say. Regular visitors to this site will notice that I have been playing with WebMatrix since its first Beta release, and just like former Microsoft ASP.NET MVC Guru, Rob Conery (who's not shy in telling Microsoft when he thinks they have goofed), I believe that Microsoft have got WebMatrix just right.

Beginning ASP.NET Web Pages with WebMatrix will be published later this year - in September to be more precise. I am being supported by my good friend Imar Spaanjaars, a fellow ASP.NET MVP and first rate author of highly successful ASP.NET books, such as Beginning ASP.NET 4: in C# and VB. The book will target those who are completely new to web development, as well as their educators, but it will also appeal to bods who have a little web development experience away from ASP.NET, or those who found ASP.NET Web Forms or MVC all a little too daunting. It should also appeal to experienced ASP.NET developers who would like some "fun" injected into their web development again.

The book will cover:

  • What WebMatrix is all about
  • An introduction to HTML and CSS
  • Designing your pages and site
  • Programming with the Razor syntax
  • Using the Package Manager
  • AJAX with jQuery
  • Data and Databases
  • Securing your site
  • Optimising (I mean Optimizing - I have to write in American now...) your site for SEO
  • and more...

If there is anything in particular that you would like to see the book cover, let me know by using the comments form at the bottom of this page.

In the meantime, I have a busy few months ahead of me, so if I'm not posting new articles as regularly as I usually do, now you know why.

Date Posted:
Last Updated:
Posted by:
Total Views to date: 11113


- Mike Ferguson

Great news Mike! I look forward to picking it up.

You've mentioned there will be a chapter(s) on databases and security. I'd really like to see how one goes about creating the simple membership provider in MySQL. Yes, I'm wrestling with it right now :)

I always enjoy your articles on WebMatrix - keep up the good work.

- Max-B

Really happy for this - and for you!

You are doing a great work with this "framework" and I think the resulting book will be good

- jean-claude

Put me down for a copy, please!

- naveenj

wow mike... can't wait!

- Sean O'Keeffe

Mike the book sounds fantastic! i think the Razor syntaxes should be as in depth as possible, if not the main "meat" of the book.

P.S its fine i like the work optimising

- Mike


Razor is just a wrapper around C#. I will cover the basics of C# in the book, and how to use Razor. However, I would always recommend learning C# properly for anyone wanting to do more than the very basics. There are quite a number of good C# books around.

- John Hastings

I know the whole world is going to C# and only a few of us dinosaurs are still using VB, but would it be so hard to put some VB in the book? Us old coots would really appreciate it.

- Mike


The book will be in C#. There is a limit to the size of the book (∛production costs / price ± likely potential copy sales or some similar formula) which means I can either include coverage of VB at the expense of content, or stick to C# and write in more depth. As it is, I'm struggling to keep to some of the chapter pagination budgets :o)

- Robby

Outstanding! If you would like a "dummy" sounding board off of which to bounce your draft chapters, I would be happy to do so. I am very much a tyro in C#, am involved in a web project using WebMatrix, and keenly aware of the erroneous assumptions some authors make about the depth of the readers' experience.
Given that I am (at least it seems to me) pretty much squarely in the dead center of the target audience for WebMatrix and Razor, I should be able to make a contribution of some value.

- mike gil

Your articles are terrific and I'm looking forward buying your book. I'm already reading Imar's book (as you suggest above) but have one basic question that might help all us "newbies" until your book does come out:

Can you use most of what is in Imar's ASP.NET book (ie: Controls, JQuery, .Net Ajax) with WebMatrix?

I get the impression that you can and that WebMatrix is just a more simplified framework than ASP.NET and is the stepping stone to MVC.

- Mike


You can use Server Controls etc in WebMatrix, but I wouldn't recommend it. Use Visual Web Developer Express instead. WM doesn't include any design time support, for one thing, and is intended primarily for developing using ASP.NET Web Pages rather than Web Forms.

- Frank Wannall

When will the book be published?

- Mike


The current publication date is the end of October 2011.

- Jeff Rogers

I look forward to the publish date. I think readers for eBooks and similar popular technologies would make good example projects for your readers. It would be nice to see some real world examples that could be adopted and built upon.

- antony

I like all books i read but i find a little pity thing who i never love especially in MSFT press book.

they hide [not show] firebug whenever they light on IE dev tool. the feature IE dev not have why they trying to show as best.

we know MSFT make IE and IE dev tool [their is another matter i know that it's unperfect]

but why MSFTian abuse MySQL , chrome and many other things when they have minus point and have a plus point in their own product.

i have no problem why they abuse but what kind of stupidity it is they talk loud when something they have better then others.

this kind of thing teach a lesson that [beware of MVP especially from corporate like Microsoft]

because Microsoft never talk about that something they not have perfect and talk loudly if they have something better. this thing not only depend on Microsoft. all other corporate have same fundamentals.

so can you sure that you write this book naturally ?

- Mike


I'm not writing an MS Press book. Beyond that, I don't work for Microsoft or understand the rest of your comments. Maybe you should check your facts?

What do you think my relationship with Microsoft is? They gave me an award, but they don't tell me what to do.

- Don Schwirtlich

Your book is one of the few that I have purchased both a kindle and hardcopy version. It and along with the spread of asp tutorials at asp.com, are awesome. I am an experienced programmer - but a newbie at web dev. thanks much.

- Matt

Hi Mike
I'm new to MW and really trying to embrace it. I've got a book at the moment which says how to add textboxes, buttons etc but you comment above says this. I'm a still very new if you could explain a bit more about how to write forms in ASP (sorry I get very easily confused with me being new to MW and trying to avoid Visual Studio if I can !!) :-

17 March 2011 20:37 from Mikesdotnetting


You can use Server Controls etc in WebMatrix, but I wouldn't recommend it. Use Visual Web Developer Express instead. WM doesn't include any design time support, for one thing, and is intended primarily for developing using ASP.NET Web Pages rather than Web Forms.

- Mike


Server controls belong to the Web Forms development model. WebMatrix is designed for the Web Pages framework. They are completely different ways of developing web applications based on ASP.NET.

- Satyabrata Mohapatra

Today i got the book "Beginning ASP.NET Web Pages with WebMatrix". It is a fantastic book !! Good for both beginners and seasoned developers.

- John

I am thoroughly enjoying your book. It is exactly what I needed to learn to use WebMatrix. However, I am having a problem getting the ListCars.cshtml to work. When I click the Get Cars button, nothing happens. I have checked all the code against what you have in the book, but still no luck.
I'm not sure if this is the right place to ask this question, but if you can let me know if the code in the book is know to run, I would appreciate knowing that.
Thank you, again for a great book!

- Mike


You really need to post your question to a forum like this one

- Mesut

Thank you for your great book. I have learned lots of from this book. Could you please prepare a new version of your book which uses Microsoft Visual Studio Express 2013 for Web and SQL Server, and at the end of the book the site which we create will be a responsive site.
Thank you in advance..

- Mike


I doubt very much whether the publishers are interested in another version of the book right now. There is a new version of ASP.NET coming out at some time and it's not clear at the moment how the Web Pages framework will fit into that.

- Gautam

Hello Mike,
I read your book, loved it!
However, I have a few request/suggestions:
1) an example of a complete web grid with, add/edit/delete/delete all functionality along with search form(1 text box & 2 drop down).
2) any scope of book vol 2, where u cover advanced topics on web pages
3) I am asking all these because I am new to programming and after reading your book on asp,net webpages implementing functionality like my point no 1 seems too tough.
4) I want to learn c# but which ever book I read they teach console apps. It is the way it should be or do u recommend a book for c#?

- Mike


You should be able to cobble a fully CRUD-enabled WebGrid form the numerous examples on this site. If you have problems getting bits to work, post questions to the WebMatrix and ASP.NET Web Pages forum.

I have no plans at the moment for a second book on Web Pages, but might think again when the next version of Web Pages is released as part of ASP.NET 5.

Any C# book would be good. They tend to use Console applications because they are are simple way to demonstrate and test C# expressions and statements. The C# you put in a Console app is the same as you would use for an ASP.NET app.

- Gautam

Hi Mike,

when you try to catch an exception in _pagestart file and then redirect in the end...
Response.Redirect("~/Error.cshtml?source=" +

is this redirect important? because web.config custom error mode "On" will any ways redirect.
whats the difference?

- Mike


You need to redirect if you don't have a custom error page configured.

Recent Comments

Thomas 05/03/2018 00:59
In response to I'm Not Writing A Book On Razor Pages
There's a typo on this page: = true)] should be [BindProperty(SupportsGet = true)]...

Rolf Herbert 04/03/2018 19:25
In response to I'm Not Writing A Book On Razor Pages
So is MS deprecating razor Web Pages..? Is it dead..? I wish they would stop killing things so its...

Borut 17/02/2018 12:59
In response to I'm Not Writing A Book On Razor Pages
Mike, is it possible that Web Pages and Razor Pages "live" together in one web application? I a I...

hrboyce 09/02/2018 04:44
In response to I'm Not Writing A Book On Razor Pages
Mike, First thanks for doing this but I have to ask, any chance you would consider converting one of...

aziz sallam 07/02/2018 10:18
In response to I'm Not Writing A Book On Razor Pages
u are a great man...

Satyabrata Mohapatra 31/01/2018 11:36
In response to I'm Not Writing A Book On Razor Pages
This is a great news!!!! Thanks...

tangdf 30/01/2018 07:25
In response to I'm Not Writing A Book On Razor Pages
=> { o.ConfigureFilter(new IgnoreAntiforgeryTokenAttribute()); }); The extension method does...

Obinna Okafor 30/01/2018 04:02
In response to I'm Not Writing A Book On Razor Pages
Thank you very much. I would like to see a project built from scratch using Razor Pages. And it show...

rachida Dukes 31/10/2017 13:52
In response to Customising Identity in Razor Pages
Thanks again for this wonderful tutorial. I followed all the steps in this section called: Adding...

Rachida 31/10/2017 12:06
In response to Customising Identity in Razor Pages
Thanks very much for this wonderful tutorial, it helped a lot....