0
我尝试在文本框的右侧添加标签以包含值的单位。 I would like to have like this如何在asp.net文本框的右侧和左侧添加标签
这是我的代码
<div class="form-group ">
@Html.LabelFor(model => model.files, htmlAttributes: new { @class = "control-label col-md-3" })
<div class="col-md-8">
@{ Html.EnableClientValidation(false); }
@Html.EditorFor(model => model.files, new { htmlAttributes = new { @class = "form-control " } })<span>GB</span>
@{ Html.EnableClientValidation(true); }
@Html.ValidationMessageFor(model => model.files, "", new { @class = "text-danger" })
</div>
</div>
感谢。
则可以通过这两个控件在单独的span标签尝试,即 @ Html.EditorFor(型号=> model.files,新{htmlAttributes = {新@class = “表单控制” }}) GB 希望它会工作没有把握,只是让我知道,如果它的作品 感谢 –