If this is classic ASP, then the solution Jared recommended would be the easiest to implement. If this is ASP.NET, then you just associate the method with the button. If it is vb.net then it would be something like...
- Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
-
' call you stored procedure
-
End Sub
c#
- // in the asp.net page
-
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
-
-
// in code behind or inline
-
protected void Button1_Click(object sender, EventArgs e)
-
{
-
// call stored procedure
-
}
-
If it is classic asp, and you want to call it without changing pages, you should look at using AJAX and call the stored procedure in a server side page.