Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
How to go back to previous page and keep all entered infomation in asp.net please help me as soon as possible
Posted 13-Feb-13 20:07pm
Comments
Gittu Dash at 18-Feb-13 11:57am
   
Solution Improved.
Chk Out.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

We have a lot of State Management techniques.
Use any of Client Side/Server Side State Management techniques to achieve your goal.
 
Here is the Code to Work with Cross Page postback:
The Following is the Code for Form1:
Here I'm using a LinkButton to go to 2nd Form.
<asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/CrossPagePostback_Form2.aspx">Go To Form2</asp:LinkButton>
        <br />
        <br />
        <asp:TextBox ID="txtTest" runat="server"></asp:TextBox>
 
Now in 2nd Form I'm just using a Label to Show the Value of TextBox present in 1st Form:
protected void Page_Load(object sender, EventArgs e)
    {
        if (PreviousPage != null)
        {
            TextBox txtTest = (TextBox)PreviousPage.FindControl("txtTest");
            Label1.Text = txtTest.Text;
        }
    }
 
This is the Process to access data present in Previous Page using CrossPage Postback.
For better Understanding of CrossPage postback you ca refer the following link:
Cross-Page Posting in ASP.NET Web Pages[^]
 
Regards.
  Permalink  
v3
Comments
er.deepshikha at 14-Feb-13 2:39am
   
sir how to use Cross Page Postback can you please tell me
Gittu Dash at 14-Feb-13 9:47am
   
Lemme try it.
If getting successful, will surely post it.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

i guess we can do it by setting enable view state property to true, and if it doesn't works you can go for session management technique i.e. if you want to transfer data from one form to another
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

You should store your previous page data in Cache.
Wikipedia : Cache (computing)[^]
 
Here is some ovservations:
MSDN : ASP.NET Caching Overview[^]
MSDN : ASP.NET Caching[^]
MSDN : ASP.NET Caching Features[^]
 
And also see:
ASP.NET - Data Caching[^]
 
--Amit
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 270
1 Sergey Alexandrovich Kryukov 185
2 BillWoodruff 173
3 CPallini 155
4 Kamal Rocks 144
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2014
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