Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have three links:

1st link is page 1 has contain form
2nd link is page 2 has contain form
3rd link is page 3 has contain form


i enter the values into the first form then clik the 2nd link next go to the first from then
1st form values gone. i need when i am click go to 1st form not gone. how to write code in csharp
Posted
Comments
sunandandutt 28-May-12 1:33am    
Please Elavorate your Question. Its not clear what are your requirements.
Technoses 28-May-12 2:21am    
Please Elavorate your Question. Its not clear what are your requirements..
do you want to create a Wizard step

then you should use Wizard Control of ASP.Net.
sagar wasule 28-May-12 2:24am    
try out if u can store the values in any statemanagement technique and bind it on page load when ever the user again approaches the page

read below article for redirect and open new page without closing previous one

http://www.techrepublic.com/blog/programming-and-development/two-approaches-to-redirection-in-aspnet/743[^]
 
Share this answer
 
see this link you may get some idea

http://msdn.microsoft.com/en-us/magazine/cc300437.aspx[^]

or

use session management concepts
see these links you may get some idea

Session management options in ASP.NET[^]

http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx[^]
 
Share this answer
 
v2
U can pass the value through session.

Page1.cs:

C#
protected void Button1_Click(object sender, EventArgs e)
    {

        HttpCookie cName = new HttpCookie("Name");
        cName.Value = TextBox1.Text;
        Response.Cookies.Add(cName);

        Response.Redirect("Page2.aspx");

        Form.Dispose();
        

    }


Page2.cs:

C#
protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("linform1.aspx");

            Constr=System.Configuration.ConfigurationManager.ConnectionStrings["masterConnectionString1"].ToString ();


    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Cookies["Name"] != null)
            TextBox1.Text  = Request.Cookies["Name"].Value;

    }



U can try like this.It will help you
 
Share this answer
 
Please Elavorate your Question. Its not clear what are your requirements..
do you want to create a Wizard step

then you should use Wizard Control of ASP.Net.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900