VB.NET/ASP.NET Server Validation question

Hello Experts,
Need some help:


 <telerik:RadTextBox    ID="txtInventoryName" runat="server" TabIndex="1" MaxLength="10">
                                     &nbsp;<bonton:ToolTipValidator ID="valInventoryName" runat="server" ControlToEvaluate="txtInventoryName" />    

I am using this server side validation:

Private Sub valInventoryName_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles valInventoryName.ServerValidate
        Dim value As String = txtInventoryName.Text.Trim.ToUpper
        If String.IsNullOrEmpty(value) Then
            valInventoryName.ErrorMessage = "Inventory Name is required"
            args.IsValid = False
        End If
    End Sub

I want it to fire only on SAVE button click…it is firing on RETRIEVE button click … how to avoid the validation on RETRIEVE…

Mani PazhanaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
There should be some kind of validationmode.

You want to set that to manual.

From there in your save event call

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mani PazhanaAuthor Commented:
RETRIEVE is preformed before SAVE.

the validation is firing on RETRIEVE... i want to avoid it.... any idea?

Mani PazhanaAuthor Commented:
got it.

Mani PazhanaAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.