Skip to content
Loading
how to display data one page to last(third page) in asp.net
  1. protected void Button1_Click(object sender, EventArgs e)  
  2.  {  
  3.     Response.Redirect("ContactInformation.aspx?FirstName=&LastName=&DateofBirth=" + txtFirstName.Text +txtLastName.Text + txtcalender.SelectedDate);  
  4.  }  
 contactinformation.aspx 2 page
  1. "form1" runat="server">  
  2.        "text-align: center">Contact Information:  
  3.   
  4.        EmailId:"txtEmailid" runat="server">  
  5.        "RequiredFieldValidator1" runat="server" ErrorMessage="Please Enter Your EmailId" ControlToValidate="txtEmailid" ForeColor="Red">  
  6.        "margin-left: 5px">
  
  •   
  •        MobileNo:"txtMno" runat="server">  
  •        "RequiredFieldValidator2" runat="server" ErrorMessage="Please Enter Your MobileNo" ControlToValidate="txtMno" ForeColor="Red">  
  •        "margin-left: 5px">
  •   
  •   
  •        Password:"txtPass" runat="server" TextMode="Password" >  
  •        "RequiredFieldValidator3" runat="server" ErrorMessage="Please Enter Your Password" ControlToValidate="txtPass" ForeColor="Red">  
  •        "margin-left: 5px">  
  •   
  •        "text-align:center">  
  •        "Button1" runat="server" Text="Submit" OnClick="Button1_Click" />  
  •          
  •      
  •  
     
    contactinformation.aspx.cs
     
    1. protected void Page_Load(object sender, EventArgs e)  
    2. {  
    3.     string FirstName = Request.QueryString["FirstName"].ToString();  
    4.     string LastName = Request.QueryString["LastName"].ToString();  
    5.     string DateofBirth = Request.QueryString["DateofBirth"].ToString();  
    6.   
    7. }  
    8.   
    9. protected void Button1_Click(object sender, EventArgs e)  
    10. {  
    11.     Response.Redirect("DisplayPage.aspx?EmailId=&MobileNo=" +  txtEmailid.Text + txtMno.Text);  
    12.   
    13. }  
     DisplayPage.aspx.cs 3 Page
     
    1. protected void Page_Load(object sender, EventArgs e)  
    2. {  
    3.     string FirstName = Request.QueryString["FirstName"].ToString();  here give the error object referance not set to an object  
    4.     string LastName = Request.QueryString["LastName"].ToString();    here give the error object referance not set to an object  
    5.     string DateofBirth = Request.QueryString["DateofBirth"].ToString(); here give the error object referance not set to an object  
    6.       
    7.     string EmailId = Request.QueryString["EmailId"].ToString();  
    8.     string MobileNo = Request.QueryString["MobileNo"].ToString();  
    9.   
    10.     Response.Write(FirstName);  
    11.     Response.Write(LastName);  
    12.     Response.Write(DateofBirth);  
    13.   
    14.   
    15.     Response.Write(EmailId);  
    16.     Response.Write(MobileNo);  
    17. }  
     display the personal information data and contact information data display on the last page(DisplayPage.aspx.cs)
     

    20 Replies

    Know the answer? Post it — somebody with the same question will find it here.