Syntax
Public Overrides Function ValidateParameter(ByVal Parameter As String, ByVal Value As String) As Boolean
Description
This function should validate the parameters added in your LP class constructor, it should check if the value is valid or not for this parameter.
the below sample explains how to validate parameters.It will return true if the Parameter value is valid.
Parameters
Part | Description |
Parameter | The parameter name that is set in AddParameter method called in the constructor.value of type String. |
Value | the value that should be validated. Value of type Strring. |
Sample
Public Overrides Function ValidateParameter(ByVal Parameter As String, ByVal Value As String) As Boolean Select Case Parameter Case "Username" Return Value <> "" Case "Password" Return Value <> "" Case "Server" Return Value <> "" Case "Port" Return Value <> "" And IsNumeric(Value) Case Else Return True End Select End Function
See Also