can we transfer data from one page to another page using
viewstate if so how?if not y?

Answer Posted / anil pandya

Yes, We can transfer one page data to another page using
viewstate,

The Way :-

The whole page data is stored in viewstate when you do a
page submit, at this point if you do server.transfer to
another page, it is like a postback on same page, you can
access both page data in view state.

To access the previous page data you have to use

System.Web.UI.Page prevPage = this.PreviousPage;

now all your controls are available with the same state they
were posted.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain different authentication modes in asp.net?

552


Define transparent caching with aop?

536


Explain how asp.net page works?

543


What is application in asp net?

496


when a request is made in Life cycle of ASP.NET page .

533






What is the use of web.config and machine.config files?

627


What is the difference between cookie and session?

504


Explain the difference between debug.write and trace.write? When should each be used?

560


Differences between “dataset” and “datareader”.

560


What are the event handlers that can be included in the Global.asax file?

580


Where is cookie used in asp.net?

577


Which type if caching will be used if we want to cache the portion of a page instead of whole page?

502


Apart from IDE what are the enhancements in asp.net 2.0?

1629


What is cookieless session id explain in brief?

531


What I need to create and run an asp.net application?

514