How to send values from one page to another?

  • Thread starter Miguel Dias Moura
  • Start date
M

Miguel Dias Moura

Hello,

i have an ASP.net / VB page with a Script (submitValues) and a Form.

1. The form has 20 input texts and a "Submit" button.
2. The script declares 20 variables. The value of each variable is taken
from each of the 20 input texts.
3. When the button "Submit" is click the variable values are sent to an
email address using AspNetEmail.

As an example, the button code is this one:
<asp:Button ID="submit" runat="server" OnClick="submitValues"
Text="Submit"/>

What i want is to create 2 Pages:
A. Page1.aspx where i put 10 input texts.
B. Page2.aspx where i put the other 10 input texts.

When i click the button in Page1, the form values are sent to Page2.
When i click the button in Page2, the form values of Page1 (received) and
the form values of Page2 (inserted) will be sent by email using the script i
mentioned.

Can you help me out?

Thanks,
 
A

avnrao

on click of submit button on page 1, post the form to Page 2 (set
action=Page2).
read all your variables in Page 2 page_load and put them in hidden variables
in page 2.
next on submit of page 2 read all variables.

Av.
 
S

Saravana [MVP]

There are a number of ways to pass values from one page to another, such as
using the querystring, cookies, session,context. You need to choose for your
applications which suits well, here is an another way for passing values
from one page to another page.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconPassingServerControlValuesBetweenPages.asp

and another article on list of options for passing values across pages.
http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx
 
M

michaelAngelo

I think the most straightforward way here is to write out
those values to a text file (do this in the submitValues
method of page1.aspx) then let page2.aspx pick those
values from the text file and post the combined group of
values to the email
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top