DevExpress control with different field name and JavaScript control name

86 views Asked by At

When you render a DevExpress MVC control, you define the Name field, which is used both for the model binding and the name of the JavaScript object that is created to access the control.

Is there a way to define a different name for the JavaScript object?

Here is the code I'm using:

var textBoxSettings = new TextBoxSettings
{
    Name = "ModelName.FieldName",       
};
writer.Write(devExpress.TextBox(textBoxSettings).GetHtml());
1

There are 1 answers

1
Shereen On

use the settings.Properties.ClientInstanceName