How to render without encoding in ASP.NET MVC Razor View ?

Published on February 18, 2013 by abundantcode

Filed under ASP.NET

Last modified February 18, 2013

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 6679 times

Are you looking to render a string in ASP.NET Razor View without encoding ? If yes , you could use the Html.Raw helper methods to achieve this.

How to render without encoding in ASP.NET MVC Razor View ?

Below is a sample code snippet to demonstrate the usage of Html.Raw in ASP.NET MVC.

@Html.Raw("Welcome to")

1 Comment

  1. Interesting .NET Links – February 19 , 2013 | TechBlog
    February 19, 2013 - 10:12 pm

Leave a Comment


You might be Interested in these Posts

How to set default value for Html.TextBoxFor in ASP.NET MVC ?

You can set the default value for the Html.TextBoxFor extension controls in ASP.NET MVC by specifyin...

ASP.NET MVC and View State

The ASP.NET Web Forms includes the Server Controls which generally retains the state of the controls...

How to decode a base64 string in C#?

Here's a sample code snippet demonstrating how you can easily decode a base64 encoded string in C#. ...