MenuAdapter.RenderEndTag(HtmlTextWriter) 方法
定义
创建最终的标记,并将控件的结束标记 (tag) 的标记 (markup) 写入发出至浏览器或设备的输出流。Creates final markup and writes the markup for the closing tag of the control to the output stream emitted to the browser or device.
protected:
override void RenderEndTag(System::Web::UI::HtmlTextWriter ^ writer);
protected override void RenderEndTag (System.Web.UI.HtmlTextWriter writer);
override this.RenderEndTag : System.Web.UI.HtmlTextWriter -> unit
Protected Overrides Sub RenderEndTag (writer As HtmlTextWriter)
参数
- writer
- HtmlTextWriter
HtmlTextWriter 实例,包含用于生成和呈现特定于设备的输出的方法。The HtmlTextWriter instance containing methods to build and render the device-specific output.
注解
RenderEndTag方法将控件结束标记的标记写入到发送到客户端浏览器的响应流的输出流。The RenderEndTag method writes the markup for the closing tag of the control to the output stream emitted to the response stream for the client browser. 特性、样式特性和开始标记在方法中呈现 RenderBeginTag 。The attributes, style attributes, and opening tag are rendered in the RenderBeginTag method. MenuItem对象是在方法中单独呈现的 RenderContents 。The MenuItem objects are rendered individually in the RenderContents method.
RenderEndTag若要实现自定义行为,请重写。Override RenderEndTag when you want to implement custom behavior. 例如,重写方法,以便在任何控件内容(如)后将多个结束标记写入响应流 </td></tr></table> 。For example, override the method to write multiple closing tags to the response stream after any control content, such as </td></tr></table>. 将 RenderEndTag 方法与方法结合使用 RenderBeginTag ,以确保在输出中开始和结束标记一致性。Use the RenderEndTag method in conjunction with the RenderBeginTag method to assure opening and closing tag consistency in your output.