Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How do we access viewstate value of this page in the next page
How do we access viewstate value of this page in the next page ?
✍: Guest
View state is page specific; it contains information about controls embedded on the
particular page. ASP.NET 2.0 resolves this by embedding a hidden input field name,
__POSTBACK . This field is embedded only when there is an IButtonControl on the
page and its PostBackUrl property is set to a non-null value. This field contains the view
state information of the poster page. To access the view state of the poster page, you can
use the new PreviousPage property of the page:
Page poster = this.PreviousPage;
Then you can find any control from the previous page and read its state:
Label posterLabel = poster.findControl("myLabel");
string lbl = posterLabel.Text;
This cross-page post back feature also solves the problem of posting a Form to multiple
pages, because each control, in theory, can point to different post back URL.
2007-10-23, 5456👍, 0💬
Popular Posts:
What Happens to Your Transactions When ERROR 1213 Occurred? - MySQL FAQs - Transaction Management: C...
What is hashing? To hash means to grind up, and that's essentially what hashing is all about. The he...
How do I install JUnit? First I will download the lastest version of JUnit. Then I will extract all ...
Can Sub Procedure/Function Be Called Recursively? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
What Happens If a Hyper Link Points to a Music File? - XHTML 1.0 Tutorials - Understanding Hyper Lin...