English 中文(简体)
mvc razor Html.Raw(</div><div category=“newDiv”>)不是作为原始产出的。
原标题:mvc razor Html.Raw("</div><div class="newDiv">") is not outputting it as raw
  • 时间:2012-04-27 20:20:02
  •  标签:
  • razor
<text>@this.Html.Raw("</div><div class="newDiv">").ToString()</text>

I m试图输出</div><div category=“newDiv”> as-is in view,但将其推向我,以便我能够看到“The”和“gt”; s。 这样做的任何其他方式? 感谢。

最佳回答

引自问题。 Html.Raw > 返回一个特别的<代码>HtmlString,其中显示Rzakttt 无需编码,但随后,你将其直线转回到一个固定的圈子里,而这种固定圈子确实被编码。 公正使用:

@Html.Raw("</div><div class="newDiv">")
问题回答

暂无回答




相关问题
How to update shared view adminheader.cshtml from a model

I ve added a drop down into my shared adminheader.cshtl view and it needs to be dynamically updated from data from a table. So when I use another view like routeplan.cshtml I load the view from ...

ASP.NET MVC Razor view engine

After reading Scott Guthrie s blog entry about the new Razor view engine for ASP.NET MVC and reading this question comparing the available view engines. Razor seems to address most of the problems ...

Client Id for Property (ASP.Net MVC)

I m trying to do a label for a TextBox in my View and I d like to know, how can I take a Id that will be render in client to generate scripts... for example: <label for="<%=x.Name.ClientId%>"...

Get Current Area Name in View or Controller

How do you get the current area name in the view or controller? Is there anything like ViewContext.RouteData.Values["controller"] for areas?

MVC which submit button has been pressed

I have two buttons on my MVC form: <input name="submit" type="submit" id="submit" value="Save" /> <input name="process" type="submit" id="process" value="Process" /> From my Controller ...

热门标签