prefilling data in html.textbox() for editPage aspnet mvc ?
Posted
by FosterZ
on Stack Overflow
See other posts from Stack Overflow
or by FosterZ
Published on 2010-05-15T17:24:36Z
Indexed on
2010/05/15
17:34 UTC
Read the original article
Hit count: 300
asp.net-mvc
hi, i have problem in prefilling data into html.textbox for editxxx purpose, i have done following..
Action Controller for Edit
public ActionResult EmployeeEdit(Guid userId)
{
_ASI_Employee employeeEdit = EmployeeRepository.GetEmployeeByUserId(userId);
return View(employeeEdit);
}
View
= Html.TextBox("EmployeeId",Model.EmployeeId) %>
= Html.ValidationMessage("EmployeeId", "*")
im getting the value of "Model.EmployeeId" but it is not getting prefilled/displayed in the textbox.
© Stack Overflow or respective owner