本文整理汇总了VB.NET中System.Web.UI.ControlValuePropertyAttribute.ControlValuePropertyAttribute构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET ControlValuePropertyAttribute构造函数的具体用法?VB.NET ControlValuePropertyAttribute怎么用?VB.NET ControlValuePropertyAttribute使用的例子?那么, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Web.UI.ControlValuePropertyAttribute
的用法示例。
在下文中一共展示了ControlValuePropertyAttribute构造函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Render
' 导入命名空间
Imports System.ComponentModel
Imports System.Web.UI
Namespace Samples.AspNet.VB.Controls
' Set ControlValueProperty attribute to specify the default
' property of this control that a ControlParameter object
' binds to at run time.
<DefaultProperty("Text"), ControlValueProperty("Text")> Public Class SimpleCustomControl
Inherits System.Web.UI.WebControls.WebControl
Dim _text As String
<Bindable(True), Category("Appearance"), DefaultValue("")> Property [Text]() As String
Get
Return _text
End Get
Set(ByVal Value As String)
_text = Value
End Set
End Property
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
output.Write([Text])
End Sub
End Class
End Namespace
示例2: Render
' 导入命名空间
Imports System.ComponentModel
Imports System.Web.UI
Namespace Samples.AspNet.VB.Controls
' Set ControlValueProperty attribute to specify the default
' property of this control that a ControlParameter object
' binds to at run time.
<DefaultProperty("Text"), ControlValueProperty("Text", "DefaultText")> Public Class SimpleCustomControl
Inherits System.Web.UI.WebControls.WebControl
Dim _text As String
<Bindable(True), Category("Appearance"), DefaultValue("")> Property [Text]() As String
Get
Return _text
End Get
Set(ByVal Value As String)
_text = Value
End Set
End Property
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
output.Write([Text])
End Sub
End Class
End Namespace