我在文本框中添加了一個提示模板。模板是工作的罰款在Firefox和Chrome,但它沒有顯示在IE10EditorTemplates無法使用IE10
Model屬性了:
[Display(Name = "Age*" , Prompt="Enter Number: ")]
public string Age { get; set; }
查看:
@Html.EditorFor(c => c.Age, new { @class = "form_txt" })
模板:
Views\Shared\EditorTemplates\String.chtml:
@Html.TextBox(string.Empty, ViewData.TemplateInfo.FormattedModelValue, new
{
@class = "form_item txt txt_gray box_gray_focus rounded_corner",
placeholder = ViewData.ModelMetadata.Watermark,
title = ViewData.ModelMetadata.Description
})