Asp.net mvc 如何在ASP.NET MVC5中添加美元符号?
如何在无法编辑的文本框前添加美元符号?我想要美元符号,这样人们就不需要自己键入“$”。这是我的密码:Asp.net mvc 如何在ASP.NET MVC5中添加美元符号?,asp.net-mvc,asp.net-mvc-5,Asp.net Mvc,Asp.net Mvc 5,如何在无法编辑的文本框前添加美元符号?我想要美元符号,这样人们就不需要自己键入“$”。这是我的密码: @Html.Label("lblP1", "Rate 1", htmlAttributes: new { @class = "control-label", @style = "margin-right: 30px" }) <br /> @Html.EditorFor(m => m.Pricing.Price1, null, new { htmlAttributes =
@Html.Label("lblP1", "Rate 1", htmlAttributes: new { @class = "control-label", @style = "margin-right: 30px" })
<br />
@Html.EditorFor(m => m.Pricing.Price1, null, new { htmlAttributes = new { @type = "string", @class = "form-control" } })
这是一个使用引导的示例:
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">$</span>
</div>
@Html.EditorFor(m => m.Pricing.Price1, null, new { htmlAttributes = new { @type = "string", @class = "form-control" } })
</div>
资料来源: