Knowledge matters...
Friday, November 26, 2010
Assign default text in Html.TextBoxFor
To assign textbox value in MVC view, use the following syntax.
<%= Html.TextBoxFor(x => x.EmployeeName, new {
@Value
= "Enter Employee Name"}) %>
Here the
@Value
case is must.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment