AllExperts > Experts 
Search      

Active Server Pages Programming (ASP)

Volunteer
Answers to thousands of questions
 Home · More 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

Topic: Active Server Pages Programming (ASP)



Expert: Ashley Brazier
Date: 2/8/2008
Subject: asp

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



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.