Link to home
Start Free TrialLog in
Avatar of zhshqzyc
zhshqzyc

asked on

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?
Avatar of xav056
xav056

you can either pass them in the querystring or session variables
http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx
Avatar of zhshqzyc

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of xav056
xav056

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial