TagHelperAttributeList.SetAttribute Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetAttribute(TagHelperAttribute) |
Replaces the first TagHelperAttribute with Name matching
|
SetAttribute(String, Object) |
Replaces the first TagHelperAttribute with Name matching
|
SetAttribute(TagHelperAttribute)
- Source:
- TagHelperAttributeList.cs
- Source:
- TagHelperAttributeList.cs
- Source:
- TagHelperAttributeList.cs
Replaces the first TagHelperAttribute with Name matching
attribute
's Name and removes any additional matching
TagHelperAttributes. If a matching TagHelperAttribute is not found, adds the
specified attribute
to the end of the collection.
public:
void SetAttribute(Microsoft::AspNetCore::Razor::TagHelpers::TagHelperAttribute ^ attribute);
public void SetAttribute (Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute attribute);
member this.SetAttribute : Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute -> unit
Public Sub SetAttribute (attribute As TagHelperAttribute)
Parameters
- attribute
- TagHelperAttribute
The TagHelperAttribute to set.
Remarks
attribute
's Name is compared case-insensitively.
Applies to
SetAttribute(String, Object)
- Source:
- TagHelperAttributeList.cs
- Source:
- TagHelperAttributeList.cs
- Source:
- TagHelperAttributeList.cs
Replaces the first TagHelperAttribute with Name matching
name
and removes any additional matching TagHelperAttributes. If a
matching TagHelperAttribute is not found, adds a TagHelperAttribute with
name
and value
to the end of the collection.
public:
void SetAttribute(System::String ^ name, System::Object ^ value);
public void SetAttribute (string name, object value);
member this.SetAttribute : string * obj -> unit
Public Sub SetAttribute (name As String, value As Object)
Parameters
- name
- String
The Name of the TagHelperAttribute to set.
Remarks
name
is compared case-insensitively.