can we transfer data from one page to another page using
viewstate if so how?if not y?
Answer / alb.shah
Yes.
View state is page specific; it contains information about
controls embedded on theparticular 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 thepage and its PostBackUrl property is
set to a non-null value. This field contains the viewstate
information of the poster page. To access the view state of
the poster page, you canuse 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 =(Label)poster.findControl("myLabel");
string lbl = posterLabel.Text;
This cross-page post back feature also solves the problem of
posting a Form to multiplepages, because each control, in
theory, can point to different post back URL.
| Is This Answer Correct ? | 10 Yes | 1 No |
Which class provides methods that can be used to manage role membership to be used in user authorization?
Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?
What are the types of validation in asp net?
Using Statement usage in C#
How many web.config files can I have in an application?
how to stop cookie in particular page using asp.net
in which protocol ASP.NET WEB API Work?
Explain repository pattern in asp.net mvc? : asp.net mvc
Can we throw exception from catch block ?
4 Answers Accenture, BirlaSoft,
What is content place holder?
Contrast the use of an abstract base class against an interface?
What is the difference between client-side and server-side validations in ASP.NET?
0 Answers Sans Pareil IT Services,
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)