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 |
what do machine key element in configuration file specify?
What is a web api? Which protocol is used in a web api?
is it possible to use web site without web server from remote place?
1 Answers ABC, Mannar Company, Quadrant,
What is synchronous and Asynchronous post back ?
Where is asp.net session stored?
What are the different validators in asp.net?
what is strong name?
4 Answers Fidelity, Infosys, Microsoft, Shriram Value Services,
what is the MSIL assembler do?
How does http session work?
What websites use asp.net?
How to reduce the width of textbox in editcommandcolumn of datagrid?
How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?