SettingsBase.Name Property
Specifies the unique identifier name for the extension.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v23.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
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.
See Also