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 the different types of directives in .net?

521


What are custom user controls in asp.net?

522


How to find last error which occurred in Asp.net ?

687


What is asp short for?

566


Describe how ASP.NET maintains process isolation for each Web application?

576






Why do we use asp.net?

590


How can u debug your .net application?

587


WSDL means?

675


Describe state management in asp.net?

555


What is the difference between stored procedure vs function?

581


Is asp.net a programming language or framework?

556


Explain what does mvc represent in asp.net? : asp.net mvc

505


What is the difference between trace and debug in asp.net?

625


Can we store object in viewstate?

539


Tell me how asp.net mvc differs from asp.net web forms? : asp.net mvc

560