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 is SQL cache Invalidation?
Where do you store the information about the user?s locale?
1 Answers Siebel, Visual Soft,
Difference Between ReadOnly and Constant Variable in compile time and Run Time.
3 Answers Phoenix Technologies, Quadrant,
Explain State management in asp.net
what is the cursor
What is the relationship between IIS and ASP.NET in the generation of dynamic Web sites?
If we add a textbox and give the required field validator,and i add two radio buttons 1 is yes another one is No.And i add another one server control button ,if i click the button ,if the radio button Yes is checked the validation control is fired ,if no the validation control is not fired.So what you used to solve this problem.
What role “#&&” plays in a querysting?
What is difference between ASP and ASP.NET ?
What does ascx stand for?
Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?
What is custom control. What is the difference between custom control and user control ?
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)