aspnet-devexpress-dot-web-dot-mvc-dot-settingsbase.md
Gets or sets the unique identifier name for the extension.
Namespace : DevExpress.Web.Mvc
Assembly : DevExpress.Web.Mvc5.v20.1.dll
NuGet Package : DevExpress.Web.Mvc5
public string Name { get; set; }
Public Property Name As String
| Type | Description |
|---|---|
| String |
The extension name.
|
You can access this nested property as listed below:
| Object Type | Path to Name |
|---|---|
| MVCxFormLayoutItem |
.NestedExtensionSettings .Name
|
The extension name defined by the Name property can be used to access the extension client object on the client side.
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
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.
asp-net-mvc-grid-export-multiple-gridviews-into-a-document/CS/Controllers/HomeController.cs#L27
GridViewSettings categoriesGridSettings = new GridViewSettings();
categoriesGridSettings.Name = "gvCategories";
categoriesGridSettings.KeyFieldName = "CategoryID";
mvc-gridview-export-data-to-different-formats/CS/Controllers/HomeController.cs#L56
settings.Name = "gvTypedListDataBinding";
settings.CallbackRouteValues = new { Controller = "Home", Action = "TypedListDataBindingPartial" };
asp-net-mvc-grid-export-hide-and-add-columns/CS/E4915/Controllers/HomeController.cs#L30
GridViewSettings settings = new GridViewSettings();
settings.Name = "GridView";
settings.CallbackRouteValues = new {
asp-net-mvc-scheduler-use-checkboxlist-to-filter-resources/CS/Code/SchedulerHelper.cs#L20
SchedulerSettings settings = new SchedulerSettings();
settings.Name = "scheduler";
settings.CallbackRouteValues = new { Controller = "Home", Action = "SchedulerPartial" };
asp-net-mvc-scheduler-appointment-edit-form/CS/Code/SchedulerHelper.cs#L21
SchedulerSettings settings = new SchedulerSettings();
settings.Name = "scheduler";
settings.CallbackRouteValues = new { Controller = "Home", Action = "SchedulerPartial" };
asp-net-mvc-grid-export-multiple-gridviews-into-a-document/VB/Controllers/HomeController.vb#L32
Dim categoriesGridSettings As New GridViewSettings()
categoriesGridSettings.Name = "gvCategories"
categoriesGridSettings.KeyFieldName = "CategoryID"
mvc-gridview-export-data-to-different-formats/VB/Controllers/HomeController.vb#L52
Dim settings As GridViewSettings = New GridViewSettings()
settings.Name = "gvTypedListDataBinding"
settings.CallbackRouteValues = New With {.Controller = "Home", .Action = "TypedListDataBindingPartial"}
asp-net-mvc-grid-export-hide-and-add-columns/VB/E4915/Controllers/HomeController.vb#L34
Dim settings As New GridViewSettings()
settings.Name = "GridView"
settings.CallbackRouteValues = New With {Key .Controller = "Home", Key .Action = "GridViewPartial"}
asp-net-mvc-scheduler-use-checkboxlist-to-filter-resources/VB/Code/SchedulerHelper.vb#L25
Dim settings As New SchedulerSettings()
settings.Name = "scheduler"
settings.CallbackRouteValues = New With {Key .Controller = "Home", Key .Action = "SchedulerPartial"}
asp-net-mvc-scheduler-appointment-edit-form/VB/Code/SchedulerHelper.vb#L24
Dim settings As DevExpress.Web.Mvc.SchedulerSettings = New DevExpress.Web.Mvc.SchedulerSettings()
settings.Name = "scheduler"
settings.CallbackRouteValues = New With {.Controller = "Home", .Action = "SchedulerPartial"}
See Also