Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="display-field">
- @Html.DisplayFor(model => model.ContentBody)
- </div>
- <div class="display-field">
- @Html.Raw(Model.ContentBody)
- </div>
- string name = "<p><span style="font-size: small; color: #ff0000;"><span style="font-size: small;"> <span style="font-size: large; color: #000000;">Hi</span><br /> <br />This is just a sample,<br />This will not work with @Html.Raw(),<br />";
- <span>@Html.Raw(name);</span>
- @MvcHtmlString.Create(HttpUtility.HtmlDecode(@model.ContentBody))
- @Html.Raw(HttpUtility.HtmlDecode(@model.ContentBody));
- public ActionResult Index(int id)
- {
- var content = _contentRepository.GetContent(id);
- var classViewModel = new ClassViewModel
- {
- ContentBody = WebUtility.HtmlDecode(ClassViewModel.ContentBody)
- };
- return View(classViewModel);
- }
- @MvcHtmlString.Create(@Model.OurVision)
- <div class="display-field">
- @model.ContentBody
- </div>
- MvcHtmlString myHtmlString = MvcHtmlString.Create("htmlcodeandtext");
- ....
- Description = WebUtility.HtmlDecode(narration.Narration1)
- <div>
- @Html.TextAreaFor(model => model.Description, HtmlAttributeHelper.ConditionalDisable(false, new {@class = "tinymce"}))
- </div>
- ......
- <td class="col-word-wrap">@Html.Raw(HttpUtility.HtmlDecode(@item.Narration1))</td>
- string noHTML = Regex.Replace(inputHTML, @"<[^>]+>| ", "").Trim();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement