Building sites with Razor
Starting with Smartsite 7.5, you can start start building websites with the language Razor, part of the Microsoft MVC framework. There are two ways to add Razor logic to your website
- Adding Razor translations
- Adding Razor logic in the logic field.
Writing Razor code in Smartsite largey matches that of the Razor language in a Microsoft Asp.Net MVC application, except that you do not have a controller and a model. The controller logic can be placed in either a @functions section like
public string SayYes()
or you can create an assembly in Visual Studio to define the logic and reference in the Smarsite.config file.