Active Server Pages Programming (ASP)/asp
Expert: Ashley Brazier - 2/8/2008
QuestionQUESTION: how can i attach an asp script to a button
ANSWER: Do you want to the script to execute some asp code once a button has been clicked?
---------- FOLLOW-UP ----------
QUESTION: yes, not only to submit button, but any button,select an item in list such click operations
Answerok, for a button you would or could do this in a page called nameofpage.asp
<%if request("submit") = "Submit Fields" then
execute asp code
end if%>
<form id="form1" name="form1" method="post" action="nameofpage.asp">
Put the form fields in here
<input type="submit" name="Submit" value="Submit Fields" />
</form>
If you want to do this with other form fields you may need to use Javascript as well.
Hope this helps