By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

How do I get data from different forms on a single page in classic asp

P: 1
Say I have 3 forms on one page.
Expand|Select|Wrap|Line Numbers
  1. <form name"form1" method="post" action="/?mode=1">
  2. <input type="text" name="fm1txt1" value="" />
  3. <input type="Submit" value="Update" name="txtUD" id="txtUD" />
  4. </form>
  6. <form name"form2" method="post" action="/?mode=2">
  7. <input type="text" name="fm1txt2" value="" />
  8. <input type="Submit" value="Update" name="txtUD" id="txtUD" />
  9. </form>
  11. <form name"form3" method="post" action="/?mode=3">
  12. <input type="text" name="fm1txt3" value="" />
  13. <input type="Submit" value="Update" name="txtUD" id="txtUD" />
  14. </form>
and finally
Expand|Select|Wrap|Line Numbers
  1. <form name="chout" action="/?mode=CO" method="post">
  2. <input type="Submit" value="Do It" name="txtCO" id="txtCO" />
  3. </form>
The last form runs a function similar to this

Expand|Select|Wrap|Line Numbers
  1. TheCO = Request.Form("??")
  2. ThePC = Request.Form("??")
  3. TheCP = Request.Form("??")
  4. Session("TheCO") = TheCO
  5. Session("ThePC") = ThePC
  6. Session("TheCP") = TheCP
I would like to pull TheCO from form1, ThePC from from 2, and TheCP from form3 hence the ?? in the above code.

Is it possible? Can you name which form you wish to pull the Request.Form data from? and if so how?
Sep 14 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.