AllExperts > Active Server Pages Programming (ASP) 
Search      
Active Server Pages Programming (ASP)
Volunteer
Answers to thousands of questions
 Home · More Active Server Pages Programming (ASP) Questions · Answer Library  · Encyclopedia ·
More Active Server Pages Programming (ASP) Answers
Question Library

Ask a question about Active Server Pages Programming (ASP)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Ashley Brazier
Expertise
Main focus is ASP, SQL Server 2000 & 2005

Experience
Over 6 years experience.

Education/Credentials
BCs Honours Software Design and Networks

 
   

You are here:  Experts > Computing/Technology > Business Software > Active Server Pages Programming (ASP) > asp

Active Server Pages Programming (ASP) - asp


Expert: Ashley Brazier - 2/8/2008

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

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.