The requested page is not available for the requested platform. You are viewing the content for Default platform.

SettingsBase.Name Property

Gets or sets the unique identifier name for the extension.

Namespace: DevExpress.Web.Mvc

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

Declaration

public string Name { get; set; }
Public Property Name As String

Property Value

Type Description
String

The extension name.

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

See Also