Error:Cannot convert lambda expression to type 'string' because it is not a delegate type
I am getting this error when I am trying to add in cshtml page in mvc4. at line
Customer Name: @Html.TextBox(m => Model.CustomerName)
Could anyone explain what is its meaning and why it comes here?Code is
@model DataEntryMvcApplication.Models.Customer
@using (Html.BeginForm())
{
<p>Customer Name: @Html.TextBox(m => Model.CustomerName)</p>
<p>ID:@Html.TextBox(m=>Model.CustomerId)</p>
<input type="submit" name="Custtomer" />
}
and this is model class;
namespace DataEntryMvcApplication.Models
{
public class Customer
{
public string CustomerId { get; set; }
public string CustomerName { get; set; }
}
}