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 |
The technical part was on ASP.Net only of web services.
Explain significance of routing? : asp.net mvc
What are the various ways to send content from one page to another?
What namespace does the Web page belong in the .NET Framework class hierarchy?
What is boxing and how it is done internally?
What is strong-typing versus weak-typing?
What is the appSettings Section in the web.config file?
How do you do client-side validation in .net? How to disable validator control by client side javascript?
What is the behavior of a Web browser when it receives an invalid element?
What are the uses of reflection?
Explain in what order a destructors is called.
In a page I have gridview with options of select and delete using hyperlink when I am selecting any one of then it has to open another page how can it?