TagHelperOutputExtensions.CopyHtmlAttribute Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Copia un atributo proporcionado por el usuario de contexts AllAttributes a tagHelperOutput.Attributes
public:
[System::Runtime::CompilerServices::Extension]
static void CopyHtmlAttribute(Microsoft::AspNetCore::Razor::TagHelpers::TagHelperOutput ^ tagHelperOutput, System::String ^ attributeName, Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContext ^ context);
public static void CopyHtmlAttribute (this Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput tagHelperOutput, string attributeName, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context);
static member CopyHtmlAttribute : Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput * string * Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext -> unit
<Extension()>
Public Sub CopyHtmlAttribute (tagHelperOutput As TagHelperOutput, attributeName As String, context As TagHelperContext)
Parámetros
- tagHelperOutput
- TagHelperOutput
Este TagHelperOutput método se extiende.
- attributeName
- String
Nombre del atributo enlazado.
- context
- TagHelperContext
El parámetro de cadena de consulta TagHelperContext.
Comentarios
Solo copia el atributo si tagHelperOutput's Attributes no contiene un atributo con el especificado attributeName.
Los atributos duplicados del mismo nombre de contextlos AllAttributes o tagHelperOutputde Attributes pueden dar lugar a que no se mantenga el orden de atributo copiado.