Learn More





DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

The Future of DNN Speaks Razor - #1 You have to migrate now!

If you're an old-school DNN developer you're used to using Forms - and you've developed tricks and techniques to compensate for various issues like clean SEO-HTML, JavaScript-Control-IDs and more. You've also implemented 3rd party controls (like a Telerik Grid) and spent hours of your time trying to compensate for certain shortcomings. Well, it turns out that this is not necessary any more - but most DNN-dudes don't realize this yet. Because the future is in absolute HTML control - using Razor. Let me tell you why, and how to get started.

This is part 1 of the Series The Future of DNN Speaks Razor. In this post I'll explain why you have to migrate now.

You have to migrate to Razor now, because…

  1. …Microsoft is officially phasing out WebForms and WebControls
  2. …this is forcing DNN to also migrate towards Razor (see the Roadmap)

  3. ...this means cshtml! and cshtml means Razor.
  4. …so if you develop something that should still work in the near future, you have to learn Razor now! 

You may believe that DNN will provide backward compatibility - and they might. But I hope they won't. Any system as mature as DNN also has loads of bad features that it picked up along the way - for example widgets - which are very expensive because they cause bugs, have to be supported, but are barely used at all. So here is an opportunity to say "We have very new stuff, and it's so different, that when you use it, you also have to adhere to modern standards". I hope they will do this - and the label "platform trimming" might just include this.

So: Yes, you have to learn Razor. ASAP. No kidding.

What Will be Developed in Razor?

  1. Menu-templates - this is already possible today with the DDR-Menu
  2. Skins - once DNN fully supports Razor, you will be able to write Razor skins
  3. Skin helpers - like tags which insert/handle a language changer - this can already be done today similar to how the DDR-Menu does it
  4. Module Output - I'm guessing that only Razor-style modules will work within a Razor skin since supporting WebControls inside a Razor would require an architecture defeating Razors advantages, and because it's a great opportunity to clean up.
  5. Admin-UIs for configuring your modules - will probably be Razor + WebAPI + AngularJS (my recommendation)
  6. Edit-UIs for entering data - also probably Razor + WebAPI + AngularJS (my recommendation)
  7. Customizable output templates which the web designer can adapt

This must be a joke, right?

Nope, this is serious. We (2sic) moved almost all our DNN-programming (except for skinning) to Razor about 2 years ago - and it's a huge blessing! Imagine things like:

  1. Module installs and updates which don't require DLLs, so no Server restarts…
  2. …and no risk that DNN will stop working. The template might fail, but not DNN
  3. If you had installed a third-party gallery and the customer needs this trivial change…you're usually forced to do loads of work including buying the module in source-edition, figuring out what approach that person used, extend the module, compile, install - and loose upgrade-compatibility…since we've moved to Razor-based Apps, this cycle is reduced to almost nothing.
  4. Since Razor is output-focused, we can easily create an alternate output-template for each portal (assuming your module supports this - which it will have to)
  5. The code is much cleaner, because Razor forces you to separate your concerns a bit more.
  6. The code is easy to read - and usually complete (not part of it hidden in a code-behind just because the programmer didn't know data-binding) 

Here an example so you see how easy it is to read Razor-Code:

My Next Razor Posts

So Each of the Following Days, I'll release another post for this topic. This will be covered:

  1. You Have to Migrate Now! (this post)
  2. Just What is Razor?
  3. The Death of WebForms
  4. The Death of MVC
  5. WebAPI is great for Apps…but not for Content
  6. Which technology to use for which part of the solution
  7. Getting started with Razor…

With love from Switzerland

Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 600 DNN projects since 1999. He is also chief architect of 2sxc (2SexyContent - see forge), an open source module for creating attractive content and DNN Apps.


PS: Want to get started before the entire Razor-series is out? For the impatient, try the DNN-Razor Host Module and watch this video  or try packaged code apps by installing 2sxc and some of the Razor Apps like the Razor Basic TutorialsList-Tutorials or the SQL and Peta-Poco Tutorials



Charles Nurse
Bang On Daniel - @Razor is awesome - but then I am somewhat biased. We added support for Razor in "WebForms" a couple of years ago and with Razor the primary View-Engine in MVC if you can do Razor now (together with jQuery and Web API) then you are all set for the future.
Charles Nurse Monday, August 25, 2014 11:55 AM (link)
Tony Henrich
"Microsoft is officially phasing out WebForms and WebControls"? AFAIK, WebForms is going to be around for years to come. Do you have an authoritative Microsoft link which supports this claim? (This post does not imply I am in support of WebForms).
Tony Henrich Monday, August 25, 2014 12:51 PM (link)
cathal connolly
It's not quite correct to state that webforms are dead, MS will continue to support and invest in it for years to come, but they've stated a number of times that webforms are "done" (announced a number of times during the MVP summit to MVP's). If you look at vnext (, you can see that they're focussing on MVC, Razor, WebAPI and OWIN ( As such we should not expect any large webforms changes, all new innovation will be on the new vnext areas, so it's pragmatic for us to look at and invest in those areas.
cathal connolly Monday, August 25, 2014 1:10 PM (link)
2sic Daniel Mettler
@Tony: I guess it boils down to the meaning of dead.
From where I stand in the web industry, dead means that the creator doesn't invest much into enhancing it at industry speed. The web-speed being amazingly fast - based on this, WebForms has been dead for a good 4-5 years already. The main improvements that happened in the last versions are some performance aspects and some trivial stuff (like ClientID control) - and that's actually just about it.
And yes, WebForms as a technology will still work in 2025. I'm sad to say that I sometimes run into projects that just went live - running on classic ASP which is dead since 2000.
As being official - if you are looking for a writing from MS stating exactly that you won't find it. MS has learned that such statements cause a lot of unintended damage and insecurity (for example: they recently declared InfoPath dead without offering a clear replacement, and that has cause loads of trouble in the SharePoint world).
But Microsoft does officially say what they are focusing on. It's a bit much to write here - but in summary: WebForms doesn't appear. When a clearly structured system whose communication is filtered through marketing doesn't mention the currently most prominent offering - that's as official as it will ever get.
2sic Daniel Mettler Tuesday, August 26, 2014 2:29 AM (link)
2sic Daniel Mettler
One more note - shows a bit of what's next and this (unfortunately 1 hour long video) also shows a lot of the vision:
2sic Daniel Mettler Tuesday, August 26, 2014 2:53 AM (link)
Tony Henrich
The comments I got through email are not showing up on the page!
Tony Henrich Tuesday, August 26, 2014 3:40 AM (link)
Joe Brinkman
Webforms is dead the same way that Cobol is dead. Yes there are still piles and piles of applications written and maintained in Cobol, but few companies willingly invest in doing any further development in Cobol. From a technology perspective, DNN has to be looking to the future and not to the past. Staying on Webforms will ensure that DNN gathers a larger and larger share of a smaller and smaller pool of developers. Not a great way to grow a platform or a community. Better for us to start the transition to a technology which still has another 5-10 years of life before the next big shift occurs.
Joe Brinkman Tuesday, August 26, 2014 5:13 PM (link)
Tony Henrich
Good to hear this sentiment coming from dnnsoftware. This means hopefully we will see serious DNN advancements towards newer Microsoft and web technologies.
Tony Henrich Tuesday, August 26, 2014 7:26 PM (link)
Peter Donker
"The web-speed being amazingly fast" Most sites are built with PHP. Not exactly lightning fast development there.
Peter Donker Sunday, August 31, 2014 1:50 PM (link)

Comment Form

Only registered users may post comments.


2sic Daniel Mettler (124)
Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (21)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (203)
Chris Paterra (55)
Clinton Patterson (28)
Cuong Dang (21)
Daniel Bartholomew (2)
Dave Buckner (2)
David Poindexter (3)
David Rodriguez (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (269)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (52)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (37)
Will Strohl (163)
William Severance (5)
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?