I am using a details view control for users to enter leave details, I have set some conditions of which if the user does not meet them then a label is displayed to tell him/her what the problem is.
But after displaying the label, I realized that the information is still entered in the table. I have tried closing the connection, exiting the sub but both are not working.
What should I do?
If days <= 1 Then Label3.Visible = True lvconn.Close() Exit Sub ElseIf days >= 30 Then Label4.Visible = True lvconn.Close() Exit Sub Else Response.Redirect("Leave_details.aspx") End If