8452a9cce0
Update unobtrusive Validation
23 lines
496 B
Plaintext
23 lines
496 B
Plaintext
@model int?
|
|
|
|
@{
|
|
Layout = "_FieldLayout.cshtml";
|
|
|
|
var htmlAttributes = new RouteValueDictionary();
|
|
if (ViewBag.@class != null)
|
|
{
|
|
htmlAttributes.Add("class", "form-control " + ViewBag.@class);
|
|
}
|
|
else
|
|
{
|
|
htmlAttributes.Add("class", "form-control");
|
|
}
|
|
|
|
if (ViewBag.placeholder != null)
|
|
{
|
|
htmlAttributes.Add("placeholder", ViewBag.placeholder);
|
|
}
|
|
}
|
|
|
|
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)
|