I am using ASP.Net 2.0. I added the following code in
button_Click page. but 'PreviousPage' is not taking as a
keyword. It throughs an error.
Page Poster = this.PreviousPage;
TextBox txtNewTest = (TextBox)Poster.FindControl("txtTest");
sDisplay = txtNewTest.Text;
Response.Write(sDisplay);
The following is the Error Message:
'controls_LoginMain' does not contain a definition
for 'PreviousPage'
Answers were Sorted based on User's Feedback
Answer / purushotham
hi u have 2 use previous page directive in page where u
want 2 access previous page controls.
aspx:
<%@ PreviousPageType VirtualPath="~/Default.aspx" %>
aspx.cs:
TextBox txt= (TextBox)Page.PreviousPage.FindControl
("TextBox1");
Response.Write(txt.Text.ToString());
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / geetha
Hi Purushotham,
Thank you very much for your suggestions.Now its working
fine.
Thanks,
Geetha
| Is This Answer Correct ? | 0 Yes | 1 No |
To make Cache item dependent on a file,directory or other cached item ,you should create an instance of which clause?
What are the asp.net 2.0 features?
What is the difference between login controls and forms authentication?
What is the main difference between Asp.net and Vb.net?
Is it possible to change the index of primary key on table?
how can u display multi language (i.e english,spanish...) web site?
What is localhost in asp.net?
What is a SESSION and APPLICATION object?
To display data in a Repeater control which template you provide?
what is .net
What is the equivalent of date() and time() in asp.net?
What is gacutil.exe? Where do we store assemblies, Should sn.exe be used before gacutil.exe?
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)