Click here to Skip to main content
12,504,984 members (63,982 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 27-May-12 19:24pm
20119991.3K
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
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

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[^]
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

U can pass the value through session.

Page1.cs:

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:

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
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 28 May 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100