SettingsBase.Attributes Property

Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control.

Namespace: DevExpress.Web.Mvc

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

Declaration

public AttributeCollection Attributes { get; }
Public ReadOnly Property Attributes As AttributeCollection

Property Value

Type Description
AttributeCollection

Remarks

Example

For ASPxHyperLink:

@Html.DevExpress().HyperLink(settings => {
    settings.Name = "skipToMainContentLink";
    settings.Properties.Text = "Skip to Main Content";
    settings.ControlStyle.Font.Size = FontUnit.Parse("350%");
    settings.Theme = "Metropolis";
    settings.NavigateUrl = "javascript:void(0);";
    settings.Attributes["onclick"] = "MyDemo.focusMainElement();";
    settings.Attributes["onfocus"] = "MyDemo.toggleSkipLinks();";
    settings.Attributes["onblur"] = "MyDemo.toggleSkipLinks();";
}).GetHtml()
See Also