Tuesday, March 24, 2009

Add validation property to UserControl

[ValidationPropertyAttribute("Text")] _
[ControlValuePropertyAttribute("Text")] _
Public Class textUpload
Inherits System.Web.UI.UserControl

Public Property Text() As String
Get
Return txtName.Text
End Get
Set(ByVal value As String)
txtName.Text = value
End Set
End Property
End Class

ps: remember to replace [] with <>

No comments:

Blog Archive