Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB.NET/ASP.NET  Server Validation question

Posted on 2013-01-11
4
Medium Priority
?
594 Views
Last Modified: 2013-01-11
Hello Experts,
Need some help:

Markup:

 <telerik:RadTextBox    ID="txtInventoryName" runat="server" TabIndex="1" MaxLength="10">
                                    </telerik:RadTextBox>
                                     &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…


Thanks
0
Comment
Question by:mani_sai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 41

Accepted Solution

by:
Kyle Abrahams earned 1500 total points
ID: 38768012
There should be some kind of validationmode.

You want to set that to manual.

From there in your save event call
valInventoryName.Validate()
0
 
LVL 8

Author Comment

by:mani_sai
ID: 38768034
RETRIEVE is preformed before SAVE.

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


Thanks
0
 
LVL 8

Author Comment

by:mani_sai
ID: 38768082
got it.

CausesValidation="False"
0
 
LVL 8

Author Closing Comment

by:mani_sai
ID: 38768084
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question