PDA

Click to See Complete Forum and Search --> : Call Server side SUB from button?


wernerh
Feb 6th, 2001, 02:16 AM
Is there a way to call a Server side sub procedure when a user clicks on a button??????

Mark Sreeves
Feb 6th, 2001, 03:06 AM
You need to post back to the server to call a serverside sub.
Here's a VERY simple example...


<%@ Language=VBScript %>
<html>
<head>
<body>

<%
dim func
func = request("f")

select case func
case 1
serverDateTime

end select


sub serverDateTime()

response.write now

end sub
%>

<FORM method="post" action="clicktest.asp" Name="frm1">
<input name=f type=hidden value=1>
<input type=submit value="Click">

</form>


</body>
</html>