Clicky

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>                               
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 

Select allOpen 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?

asked 12/14/2011 02:24

zhshqzyc's gravatar image

zhshqzyc ♦♦


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

answered

xav056's gravatar image

xav056

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.
link

answered 2011-12-14 at 10:30:14

zhshqzyc's gravatar image

zhshqzyc

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
link

answered 2011-12-14 at 10:33:32

xav056's gravatar image

xav056

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

Asked: 12/14/2011 02:24

Seen: 265 times

Last updated: 12/14/2011 03:20