对于数据输入字段,我想在用户悬停在该字段上时显示提示。字段名称为 INACT 并指示记录是否已被停用。需要这样的东西 - 输入 I 以停用记录。
我在 ModelMetadata 中有这个
[Display(Name = "INACT")]
[DisplayFormat(ConvertEmptyStringToNull = true)]
[StringLength(1)]
public string A_INACT;
Run Code Online (Sandbox Code Playgroud)
并在非活动视图中显示 - 此视图是唯一可以编辑此字段的地方。:
<div class="editor-label">
@Html.LabelFor(model => model.A_INACT)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.A_INACT , new { htmlAttributes = new { tabindex = 1 } })
@Html.ValidationMessageFor(model =>Model.A_INACT)
</div>
Run Code Online (Sandbox Code Playgroud)
不真实的观点
@model MTSapp.Models.mts_rename
@{
ViewBag.Title = "Inact";
}
<style>
.container {
width: 50%;
float: left;
}
</style>
<h2>RE NAME </h2>
<h2>Inact Re Number</h2>
@using (Html.BeginForm())
{
@Html.ValidationSummary(true)
<fieldset>
<legend>mts_rename</legend>
<br /> …Run Code Online (Sandbox Code Playgroud)