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.EnableValidation
txt.MinValue
txt.MaxValue
txt.ErrorBackgroundColor
txt.ErrorMessage
txt.FriendlyName
txt.AutoUpCase
i do my own custom dropdownlist, custom this custom that
all of controls, i implement IValidator
Partial Class Controls_UCTextbox
Inherits CBaseControl
Implements IValidator
Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
MyBase.OnInit(e)
Page.Validators.Add(Me)
End Sub
Protected Overrides Sub OnUnload(ByVal e As System.EventArgs)
If Not IsNothing(Page) Then
Page.Validators.Remove(Me)
End If
MyBase.OnUnload(e)
End Sub
etc....
validationsummary 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...@gmail.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.