本文整理匯總了VB.NET中System.Web.UI.TagPrefixAttribute類的典型用法代碼示例。如果您正苦於以下問題:VB.NET TagPrefixAttribute類的具體用法?VB.NET TagPrefixAttribute怎麽用?VB.NET TagPrefixAttribute使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TagPrefixAttribute類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Render
' 導入命名空間
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
<assembly: TagPrefix("CustomControls", "custom")> _
Namespace CustomControls
' Simple custom control
Public Class MyVB_Control
Inherits Control
Private message As String = "Hello"
Public Property getMessage() As String
Get
Return message
End Get
Set (ByVal value As String)
message = value
End Set
End Property
<System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Protected Overrides Sub Render(writer As HtmlTextWriter)
writer.Write(("<span style='background-color:aqua; font:8pt tahoma, verdana;'> " + Me.getMessage + "<br>" + "VB version. The time on the server is " + System.DateTime.Now.ToLongTimeString() + "</span>"))
End Sub
End Class
End Namespace 'CustomControls