Restore added data in Data Grid in a Page When the page is reloaded

  • Thread starter Thread starter krian
  • Start date Start date
K

krian

Hi,
I need a help from anybody. My problem is here
I wrote two WebApplication in ASP.net Using C#. The name of the
applications are (Journal.aspx and Payment.aspx). These Two pages have
DataGrids in each page and links to the other page(Journal.aspx
contain Payment.aspx link and Payment.aspx contain Journal.aspx link)
Suppose we added (updated) data in the DataGrid which is in
"Journal.aspx" page and clicked the link which in the page. Then it
loads the Payment.aspx page , suppose if we click on the
"Journal.aspx" the data, which was added(updated) in firsttime, should
be restored when the "journal.aspx" page is loaded.

What ever changes we made to DataGrid in the Journal.aspx , the
changes should be presented when the page is again relaoded..
How It can be done.......?
by
kiran
 
Hi kiran,

Change the links pointing to the other page to buttons which submit the
form back to itself. In the button click event, do whatever you need to do
to store the data (in a database, in session). Then call Response.Redirect
to go to the other page.

When you click a link, it tells the browser to view something else. The
browser does this without regard to the content of the current page. So,
the current page is essentially lost. If you later click a link coming back
to this page, you will get a new instance of the page.

By changing the links to post back buttons, we allow your page to return
its data to the server where it can be stored for later use.

Thank you, Mike
Microsoft, ASP.NET Support Professional

Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.


--------------------
 
Back
Top