Jump to content

Can I use two .asp scripts in the same webform?


markwill2112

Recommended Posts

Apologies - my previous question was rubbish and not clear (even to me)!

 

Is it possible to use two server-side .asp scripts in the same webform and use an if statement in the form to send form submissions via one of the two scripts based on choices from a drop-down menu?

 

Basically I have a drop-down list of course choices in a web form. If I select course A from the drop-down list, I want the completed form submission to be sent via .asp script number 1. If I select course B, I want the completed course submission to be sent via .asp script number 2 and so on for different course choices from the list.

 

Is that possible? I tried to create an if statement using the following two scripts, but it just kept sending to the first .asp script and ignored the second one.

 

action="http://www.imperial.ac.uk/ict/services/website/cms/help/edudev/emailfom.asp" method="post">

action="http://www.imperial.ac.uk/ict/services/website/cms/help/edudev/emailnonfom.asp" method="post">

Link to comment
Share on other sites

No, I don't believe you can use two ASP scripts.

 

However, you should be able to use one ASP script, and then use an if statement to choose between two sets of code to run. For example, at the top of the ASP file, you would get the value from the dropdown list, and do X code if the user selected A, but do Y code if the user selected B from the dropdown.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...