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

Explain ViewState?

765


What is the difference between user control and custom control?

678


What are HTTP handlers in ASP.NET?

758


What is app_code folder in asp net?

733


Explain what the contents of cookie?

776


Is asp.net and .net same?

718


What are the disadvantages of view state?

811


Explain what are delegates?

808


What is the use of HttpHandlers? When to use this?

814


Can anyone please tell me that the question posted on this website are Sufficient for the interview with 2+ year experience in .net

1710


What is marshalling ? Is it a part of asp.net ?

804


Can a .net web application consume java web service?

710


How dataadapter.fill works?

739


What is a web api? Which protocol is used in a web api?

726


What is comparevalidator?

705