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

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
 
M

Mike Moore [MSFT]

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.


--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top