<abc:RequiredFieldValidator runat="server" ControlToValidate="uxFirstNameTextBox" Entity="First Name" ValidationGroup="MainValidationGroup" />
Imports Microsoft.VisualBasic Imports System.Web.UI.WebControls Namespace AcmeBroomCompany Public Class RequiredFieldValidator Inherits System.Web.UI.WebControls.RequiredFieldValidator Private _entity As String Public Sub New() Display = ValidatorDisplay.Dynamic EnableClientScript = True SetFocusOnError = True Text = "" Dim img As Image = New Image() img.ImageUrl = "~/images/Exclamation.png" Me.Controls.Add(img) _entity = "" End Sub Public Property Entity() As String Get Return _entity End Get Set(ByVal value As String) _entity = value ErrorMessage = _entity & " must be specified." End Set End Property End Class End Namespace
TODO