tags:

views:

98

answers:

3

if anyone knows plz reply

A: 

Simply put this at the end of your function:

Exit Function
Sarfraz
thanks..its throwing error for exit ..i just want to make that particular conditin false after executing (its server side validation hv to make it false and execute next conditin)
sujatha
@sujatha: Please post your code also to see exactly what you want.
Sarfraz
Do you mean `Exit Function` ? :)
MarkJ
@MarkJ: Yes sorry that's what i meant, thanks for pointing that :)
Sarfraz
+2  A: 

Is this what you mean?

Function TestValue() As Boolean
    TestValue = False
End Function
pm_2
how to do email validation with regular expressin in asp using vb (server side validation) thanks
sujatha
@suj omg you went from not being able to return a value from a function to validation + regex? Ever get the feeling you are in WAY over your head?
Will
+1  A: 

You can put the name of the Function in the function code with the False value to set the funcion return to False.

Function TestValue() As Boolean
    TestValue = False
End Function

Also if you have more code and you need to return NOW the value you, and not to continue executing the funcion, you can add the sentence "Exit Funcion"

Function MyFuncion() As Boolean

    .. some code ...

    if ...some value test ... Then
        'If you  some value test  is true we return false and exit the funcion
        MyFuncion = False
        Exit Function
    End If

    'If some value test  was not true the code continues executing and we return true
    .. some code ...
     MyFuncion = True

End Function
Dubas
how to do email validation with regular expressin in asp using vb (server side validation) thanks
sujatha