How can I give my TextBox, ng-click
attribute when using Html.TextBoxFor
?
@Html.TextBoxFor(model => model.User.Firstname,
new {
@class = "form-control required",
placeholder = "نام"
})
Add ng_click to htmlAttributes
object.
@Html.TextBoxFor(model => model.User.Firstname, new
{
@class = "form-control required",
placeholder = "نام" ,
ng_click = "yourFunc()"
})
*Note : The
_
instead of-
in ng_click is because C# does not accept-