Robert Rodgers
|
| Posted: 01/29/2003, 5:53 PM |
|
Using Beta 2.0.0.0 And ASP
Enable Validation = NO and my cancel button still goes through the
Validate() Sub. If this is normal I think it needs to be changed. I think
the code below should be written some thing like this.
Thanks.
rob
NEW::
================================================
Select Case PressedButton
Case "Delete1"
If NOT Delete1.OnClick OR NOT DeleteRow() Then
Redirect = ""
End If
Case "Cancel"
If NOT Cancel.OnClick() Then
Redirect = ""
End If
Case Else
Select Case PressedButton
Case "Insert1"
If NOT Insert1.OnClick() OR NOT InsertRow() Then
Redirect = ""
End If
Case "Update1"
If NOT Update1.OnClick() OR NOT UpdateRow() Then
Redirect = ""
End If
End Select
End Select
ORIGINAL:
================================================
If PressedButton = "Delete1" Then
If NOT Delete1.OnClick OR NOT DeleteRow() Then
Redirect = ""
End If
ElseIf Validate() Then
If PressedButton = "Insert1" Then
If NOT Insert1.OnClick() OR NOT InsertRow() Then
Redirect = ""
End If
ElseIf PressedButton = "Update1" Then
If NOT Update1.OnClick() OR NOT UpdateRow() Then
Redirect = ""
End If
ElseIf PressedButton = "Cancel" Then '''''' Why????
If NOT Cancel.OnClick() Then
Redirect = ""
End If
End If
End IF
|
|
|
 |
|