Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
645
TextEditorFor Incorrect ID generated for nested model, uses "." in JS and "_" in HTML
posted

I have a model like the following

public class MyModel {

  public Customer Customer {get;set;}

}

public Customer {

   public string Name {get;set;}

}

I then create a view with the and use @Html.EditorFor(m => m.Customer)

my customer shared editor template has

@Html.EditorFor(m => m.Name)

and my string shared editor template has

@Html.Infragistics().TextEditorFor(m => m).Render()

Now when the HTML is generated the divs get created id="Customer_Name" but the javascript uses $("Customer.Name")