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

Answer Posted / prasad bakshi

This is VERY MUCH POSSIBLE to access viewstate on another
page. This is only possible when you use SERVER.TRANSFER

Try this out.

Create a textbox control on page1.aspx and have a button.

Onclick of button put this code in page load event of
Page2.aspx.

/*****************************************************/
Page Poster = this.PreviousPage;

TextBox txtNewTest = (TextBox)Poster.FindControl("txtTest");

sDisplay = txtNewTest.Text;

Response.Write(sDisplay);
/*****************************************************/

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

ASP.NET 2.0's new membership API used for creating and managing user account is exposed through which 2 clause?

1461


What is difference between viewstate and session in asp net?

557


Describe the disadvantage of cookies.

592


What is difference cookie and session?

523


What is viewstate information stored?

594






What is application and session in asp.net?

531


When maintaining session through sql server, what is the impact of read and write operation on session objects?

527


What is the state management in asp.net?

544


How many types of triggers are there in update panel?

567


How can we inherit a static variable?

537


If we remove web.config or machine.config from the application then, is this application will works?

592


What is the difference between a cookie and a pixel?

474


Why is global asax is used?

605


what is command line compiler.what are the steps and how it is related to debugging.

1409


What is sql data source control in asp.net?

565