Active Server Pages Programming (ASP)/asp

Advertisement


Question
QUESTION: 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

Answer
ok, 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

Active Server Pages Programming (ASP)

All Answers


Answers by Expert:


Ask Experts

Volunteer


Ashley Brazier

Expertise

Main focus is ASP, SQL Server 2000 & 2005

Experience

Over 6 years experience.

Education/Credentials
BCs Honours Software Design and Networks

©2012 About.com, a part of The New York Times Company. All rights reserved.