Pass variable between web pages.

Suppose I have two pages. Page one is just creating users, The code likes
<asp:CreateUserWizard ID="CreateUserWizard2" runat="server" BackColor="#FFFBD6" 
           BorderColor="#FFDFAD" BorderStyle="Solid" BorderWidth="1px" 
           Font-Names="Verdana" Font-Size="0.8em" 
    OnCreatedUser="CreateUserWizard1_CreatedUser" DisableCreatedUser="true" 
           LoginCreatedUser="false" ActiveStepIndex="2">
            <WizardSteps>
                <asp:WizardStep ID="CreateUserWizardStep0" runat="server">
                    <table>
                        <tr>
                            <th>Account Information</th>
                        </tr>
                        <tr>
                            <td>First Name:</td>
                            <td>
                                <asp:TextBox runat="server" ID="FirstName" MaxLength="50" />
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="FirstName"
                                     ErrorMessage="First Name is required." />
                            </td>
                        </tr> 
                        <tr>
                            <td>Last Name:</td>
                            <td>
                                <asp:TextBox runat="server" ID="LastName" MaxLength="50" Columns="15" 
                                    Width="127px" />
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="LastName"
                                     ErrorMessage="Last Name is required." />
                            </td>
                        </tr>  

Open in new window

Then I want to display the information on page two generated from page one by the user's input. Thus needs to pass variables.
How to?
zhshqzycAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xav056Commented:
you can either pass them in the querystring or session variables
http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx
0
zhshqzycAuthor Commented:
Need more details, suppose on page 2 I have a table. Two columns, one is for First Name, the other one is for Last Name.
0
xav056Commented:
So on page 1 you will do
Response.Redirect("toPage1.aspx?FirstName=nameValue&LastName=lastnameValue")

on page do in the poageload event you will retireve quesery string 1 and 2
Dim firstName as string=Request.QueryString("FirstName")
Dim lastName as string=Request.QueryString("LastName")

Then lets say you have a table on page 2
you do table.rows(0).Cells(0)=firstName
you do table.rows(0).Cells(1)=lastName
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.