Trying to fire a server side function (either from the code behind or a script runat=server tag) and have this function called before a form is submitted client side. It seems when I use the following code:
<script runat="server">
Sub Test()
Response.Redirect("this is a test")
End Sub
</script>
<form method="post" action="someaction.php" runat="server">
<INPUT id="btnSubmit" type="submit" value="Submit Form" name="btnSubmit" class="button" onclick="<%Test%>">
</form>
The onclick event of the button is being fired when the page is loaded, not when the button is clicked. Is there any way to fix this? Appreciate any information.
Go to the complete details ...