本文整理匯總了VB.NET中System.Web.UI.HtmlTextWriter.OnTagRender方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET HtmlTextWriter.OnTagRender方法的具體用法?VB.NET HtmlTextWriter.OnTagRender怎麽用?VB.NET HtmlTextWriter.OnTagRender使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Web.UI.HtmlTextWriter
的用法示例。
在下文中一共展示了HtmlTextWriter.OnTagRender方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: OnTagRender
' If a <font> element is to be rendered, check whether it contains
' a size attribute. If it does not, add one and set its value to
' 20 points, then return true.
Protected Overrides Function OnTagRender( _
name As String, _
key As HtmlTextWriterTag) _
As Boolean
If (key = HtmlTextWriterTag.Font) Then
If Not (IsAttributeDefined(HtmlTextWriterAttribute.Size)) Then
AddAttribute(HtmlTextWriterAttribute.Size, "20pt")
Return True
End If
End If
' If the element is not a <font> element, use
' the base functionality of the OnTagRenderMethod.
Return MyBase.OnTagRender(name, key)
End Function