1

I am using MVC3 Razor for developing a web application.Am new to MVC3. I just want to render a dynamic string which contains some html tags into a view as html.

How can I achieve this? if anybody knows please share..

1

1 Answer 1

7

You can use the HtmlHelper.Raw method.

string myDynamicContent = "<b>This is bold</b>";

@Html.Raw(myDynamicContent)
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Eric For such a fast and helpful response.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.