Skip to main content

SettingsBase.Name Property

Specifies the unique identifier name for the extension.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v23.2.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public string Name { get; set; }

Property Value

Type Description
String

The extension name.

Property Paths

You can access this nested property as listed below:

Object Type Path to Name
MVCxFormLayoutItem

Remarks

The extension name defined by the Name property can be used to access the extension client object on the client side.

var tbValue;
function preserveTextBoxValue(){
    tbValue = textBox1.GetText();
}
@Html.DevExpress().TextBox(
    settings => {
        settings.Name = "textBox1";
        settings.Text = "some text";
    }
).GetHtml()

Special Characters in the Name

If the Name property contains special characters, for instance, the dot (.), you cannot access a client object by this name. Call the GetByName(name) method to retrieve the client-side object instead.

@Html.DevExpress().TextBox(settings => {  
    settings.Name = "SomeType.SomeProp";  
}).GetHtml()  
var txt = ASPxClientControl.GetControlCollection().GetByName("SomeType.SomeProp");  
txt.SetText("Some Text");  

For more information, see the Client-Side API help topic.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Name property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also