my custom textbox has something like this
txt.Required = true
txt.DataType = String,Integer, Money,Date, RegExp etc...
txt.RegExp = "#@$@"
txt.AutoTrim = true
txt.MinLength
txt.MaxLenght
txt.EnableValid ation
txt.MinValue
txt.MaxValue
txt.ErrorBackgr oundColor
txt.ErrorMessag e
txt.FriendlyNam e
txt.AutoUpCase
i do my own custom dropdownlist, custom this custom that
all of controls, i implement IValidator
Partial Class Controls_UCText box
Inherits CBaseControl
Implements IValidator
Protected Overrides Sub OnInit(ByVal e As System.EventArg s)
MyBase.OnInit(e )
Page.Validators .Add(Me)
End Sub
Protected Overrides Sub OnUnload(ByVal e As System.EventArg s)
If Not IsNothing(Page) Then
Page.Validators .Remove(Me)
End If
MyBase.OnUnload (e)
End Sub
etc....
validationsumma ry will get messages from ErrorMessage (IValidator
method declaration). I learn this from codeproject, and enhance it
myself
I prefer this way, easy to maintain, and boosts employee's morale.
On Oct 4, 4:07 pm, jack <gautams.m...@g mail.comwrote:
Im a new bee in validation
Im just in the design phase of the project and not thinking about
having a saperate validaion block.
Just browsed through validaion block of enterprise library which is
one of the options which ill use..
I would be glad if some one help me with any of the resources or idea
of how to handle validaitons in project..Like creating saperate
component for validation.