SettingsBase.Name Property
Gets or sets the unique identifier name for the extension.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v18.2.dll
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 |
|
PivotGridSettings | |
ReportToolbarExtension |
|
ReportViewerExtension |
|
SchedulerSettings | |
SchedulerStorageControlSettings |
Remarks
The extension name defined by the Name property can be used to access the extension client object on the client side.
Example
View code (ASPX):
...
<script type="text/javascript">
var tbValue;
function preserveTextBoxValue(){
tbValue = textBox1.GetText();
}
</script>
...
<%
Html.DevExpress().TextBox(
settings => {
settings.Name = "textBox1";
settings.Text = "some text";
}
)
.Render();
%>
View code (Razor):
...
<script type="text/javascript">
var tbValue;
function preserveTextBoxValue(){
tbValue = textBox1.GetText();
}
</script>
...
@Html.DevExpress().TextBox(
settings =>
{
settings.Name = "textBox1";
settings.Text = "some text";
}
).GetHtml()
For more information, see the Client-Side API help topic.
Note
If the Name property contains special characters, use the approach described in the following Knowledge Base Article to access the client-side programmatic object.
KA18687: How to use the ClientInstanceName and Name properties when they contain special characters
Related GitHub Examples
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.