Label.AddAttributesToRender(HtmlTextWriter) 方法
定义
protected:
override void AddAttributesToRender(System::Web::UI::HtmlTextWriter ^ writer);
protected override void AddAttributesToRender (System.Web.UI.HtmlTextWriter writer);
override this.AddAttributesToRender : System.Web.UI.HtmlTextWriter -> unit
Protected Overrides Sub AddAttributesToRender (writer As HtmlTextWriter)
参数
- writer
- HtmlTextWriter
表示在客户端上呈现 HTML 内容的输出流的 HtmlTextWriter。An HtmlTextWriter that represents the output stream to render HTML content on the client.
例外
未能找到 AssociatedControlID 属性中指定的控件。The control specified in the AssociatedControlID property cannot be found.
注解
此 AddAttributesToRender 方法主要由控件开发人员用来将其他特性和样式插入控件的 HtmlTextWriter 输出流中 Label 。The AddAttributesToRender method is used primarily by control developers to insert the additional attributes and styles to the HtmlTextWriter output stream for a Label control.
AddAttributesToRender控件的方法 Label 确定是 for 应使用值添加特性 AssociatedControlID ,还是应应用内联块样式来显示边框样式和宽度。The AddAttributesToRender method for a Label control determines whether the for attribute should be added with the AssociatedControlID value, and if the inline-block style should be applied to display the border style and width.