ComponentBuilder
  • 🌍English
    • Introduction
    • Quick Start
    • CSS Class
      • CssClass Attribute
      • BooleanCssClass Attribute
      • NullCssClass Attribute
      • BuildCssClass Method
    • HTML Attribute
      • HtmlTagAttribute
      • HtmlAttribute Attribute
      • HtmlRole Attribute
      • HtmlData Attribute
      • HtmlAria Atrribute
      • HtmlEvent Attribute
      • BuildAttributes Method
    • Component Association
    • Interceptor
    • Extensions
      • RenderTreeBuilder Extensions
  • 🇨🇳Chinese
    • 简介
    • 快速开始
    • CSS 类
      • CssClassAttribute 特性
      • BooleanCssClass 特性
      • NullCssClass Attribute
      • BuildCssClass 方法
    • HTML 属性
      • HtmlTag 特性
      • HtmlAttribute 特性
      • HtmlRole 特性
      • HtmlData 特性
      • HtmlAria Atrribute
      • HtmlEvent Attribute
      • BuildAttributes Method
    • 组件关联
    • 拦截器
    • 扩展
      • RenderTreeBuilder 的扩展
Powered by GitBook
On this page
  1. 🌍English
  2. HTML Attribute

BuildAttributes Method

For customization code to build html attribute of component

protected override void BuildAttributes(IDictionary<string, object> attributes)
{
    if(HasClicked)
    {
        attributes["onclick"] = HtmlHelper.Event.Create(this, () => { /*...*/ });
    }
}
PreviousHtmlEvent AttributeNextComponent Association

Last updated 2 years ago