Find a post...

DNN-Connect Blogs

Learning Razor 1 - RSS-App Part 5: Many Views for the same Content

In this post # 5 of my mini-series Learning Razor with an RSS-App I want to get you hooked on the power of Razor (and 2sxc while we're at it :). I will show you how much easier it is to create new designs thanks to the open source, html-close nature of Razor.

Because Razor is so easy to read and to modify, it becomes very easy to take any existing solution - like the one we created so far:

...and we can easily change the HTML-structure a bit, so it looks like this…

or like this…    

Such changes were very, very hard in WebForms, because there were so many ways to bind data - and so many different repeaters with various limitations - that each solution had other problems. 

Not so with Razor! So there's not so much to write right now - I'll just let you discover and try it for yourself.

Make sure you have everything you need

Again, install 2sxc and everything just like in Post #2, but in this case:

  • Make sure you're using at least the version of 2sxc
  • Also install the final App for this lesson from Codeplex or the forge.

If you need help, just watch the video of post #2 in this series.

Brief Razor Customizations Walk-Through Video

and you can see the live version here.

Now Try a bit yourself…

Go ahead and mess about with the code. You can do it in Visual Studio or with the edit-template functionality. And don't worry: you can always uninstall the App and install it again when you mess it up :).

So just try it out, look at the code, have fun!

With love from Switzerland
Daniel

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.

 

Daniel Mettler learned programming with the bible translation computer of his parents, deep in the jungles of Indonesia. Since he was only 12 years old at that time and the BIOS only had a version of BASICA, that's what got him started. With 16 he went back to Switzerland and learned German and basic city-survival skills. Equipped with this know-how he founded 2sic internet solutions in 1999 which was focused on web solutions on the Microsoft platform. After a few self-developed CMSs 2sic switched to DNN in 2003 and has been one of the largest partners (17 employees, 700+ projects) in Europe. Daniel is also the chief architect behind the open source 2sxc, a strong promoter of standardization (boostrap, patterns, AngularJS, checklists, etc.) and loves to eat anything - dead or alive. His motto: if the natives eat it, it game.
Comment(s)

Hosting liberally provided by

Philipp Becker 6011 7
Geoff Barlow 542 4
DNN-Connect 431 6
Peter Donker 5092 30
Christopher Hammond 683 2
Olivier Jooris 418 1
Daniel Mettler 12054 88
Clint Patterson 1 1
Jos Richters 65 1
James Rosewell 327 2
Will Strohl 1550 27
Ernst Peter Tamminga 438 4
Barry Waluszko 2801 2
Declan Ward 467 1
Gifford Watkins 722 9
Torsten Weggen 2792 3