Skip to main content
Home  ›  Blog

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 800 DNN projects since 1999. He is also chief architect of 2sxc (see github), an open source module for creating attractive content and DNN Apps.

Read more posts by Daniel Mettler