The Html.TextBox
syntax is:
public static MvcHtmlString TextBox(this HtmlHelper htmlHelper, string name,
object value, object htmlAttributes);
So, i put my data attribute in htmlAttributes
. I have tried
@Html.TextBox("date",Model.Date,new { data-myid="aaa"})
but that doesn't work for me.