Write Inline Razor
When you need to insert small snippets of razor, it can be frustrating to have to create a Razor view, submit and approve it before inserting it into a template or page. This article will walk you through how to write inline razor with the help of an inline razor control.
- Right click on a page in the WYSIWYG editor where you want the control to be placed.
- Select Insert Web Control from the context menu. Navigate to Standard.
- Select Inline Razor for the fly out menu – a dialog window will open.
- Select the language that you writing your Razor in (we recommend c# - that’s the default).
- Type the Razor you want to appear on the page.
Using Razor via WebDAV
If you work locally using WebDAV, you can take advantage of the new inline razor control as well as referencing Razor files by using the following syntax:
Inline Razor View Web Control Syntax
Inline Razor View File Syntax
Was this article helpful?