You do:
@Html.Raw(Json.Encode(Model.PotentialAttendees))
In releases earlier than Beta 2 you did it like:
@(new HtmlString(Json.Encode(Model.PotentialAttendees)))
More Related Contents:
- c# asp.net delete last comma [closed]
- Html.DropdownListFor selected value not being set
- How do I specify different Layouts in the ASP.NET MVC 3 razor ViewStart file?
- How can I supply an AntiForgeryToken when posting JSON data using $.ajax?
- How to use jquery or ajax to update razor partial view in c#/asp.net for a MVC project
- Replace line break characters with in ASP.NET MVC Razor view
- ASP.NET MVC 3 – Partial vs Display Template vs Editor Template
- Add CSS or JavaScript files to layout head from views or partial views
- Writing/outputting HTML strings unescaped
- In MVC3 Razor, how do I get the html of a rendered view inside an action?
- How to render a Section in a Partial View in MVC3?
- Razor-based view doesn’t see referenced assemblies
- ASP.NET MVC load Razor view from database
- MVC: How to Return a String as JSON
- Differences between Html.TextboxFor and Html.EditorFor in MVC and Razor
- MVC controller : get JSON object from HTTP body?
- Razor View Engine : An expression tree may not contain a dynamic operation
- How to return Json object from MVC controller to view
- Html.Textbox VS Html.TextboxFor
- How to display an image from a path in asp.net MVC 4 and Razor view?
- Converting flattened hierarchical data from SQL Server into a structured JSON object with C#/Linq
- How to link HTML5 form action to Controller ActionResult method in ASP.NET MVC 4
- Set disable attribute based on a condition for Html.TextBoxFor
- MVC Razor view Intellisense broken in VS 2013/2015/2017
- What ‘sensitive information’ could be disclosed when setting JsonRequestBehavior to AllowGet
- Razor: @Html.Partial() vs @RenderPage()
- How to compile cshtml before runtime
- How to create a function in a cshtml template?
- Razor ViewEngine HTML.Checkbox method creates a hidden input. Why? [duplicate]
- How do I create a MVC Razor template for DisplayFor()