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.
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)