Click here to Skip to main content
12,884,480 members (29,809 online)
Rate this:
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 please help me as soon as possible
Posted 13-Feb-13 19:07pm
Gittu Dash 18-Feb-13 11:57am
Solution Improved.
Chk Out.
Rate this: bad
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[^]

er.deepshikha 14-Feb-13 2:39am
sir how to use Cross Page Postback can you please tell me
Gittu Dash 14-Feb-13 9:47am
Lemme try it.
If getting successful, will surely post it.
Rate this: bad
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
Rate this: bad
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[^]


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.170422.1 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2017
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