本文整理汇总了VB.NET中System.Web.UI.AttributeCollection.Render方法的典型用法代码示例。如果您正苦于以下问题:VB.NET AttributeCollection.Render方法的具体用法?VB.NET AttributeCollection.Render怎么用?VB.NET AttributeCollection.Render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.AttributeCollection
的用法示例。
在下文中一共展示了AttributeCollection.Render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Render
' Create a custom WebControl class, named AttribRender, that overrides
' the Render method to write two introductory strings. Then call the
' AttributeCollection.Render method, which allows the control to write the
' attribute values that are added to it when it is included in a page.
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Security.Permissions
' Create the namespace that contains the AttribRender and the
' page that accesses it.
Namespace AC_Render
' This is the custom WebControl class.
<AspNetHostingPermission(SecurityAction.Demand, _
Level:=AspNetHostingPermissionLevel.Minimal)> _
Public Class AttribRender
Inherits WebControl
' This is the overridden WebControl.Render method.
Protected Overrides Sub Render(ByVal output As HtmlTextWriter)
output.Write("<h2>An AttributeCollection.Render Method Example</h2>")
output.Write("The attributes, and their values, added to the ctl1 control are <br><br>")
' This is the AttributeCollection.Render method call. When the
' page that contains this control is requested, the
' attributes that the page adds, and their values,
' are rendered to the page.
Attributes.Render(output)
End Sub
End Class
End Namespace 'AC_Render