Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



I am using ASP.Net 2.0. I added the following code in button_Click page. but 'PreviousPage�..

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

I am using ASP.Net 2.0. I added the following code in button_Click page. but 'PreviousPage�..

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

Post New Answer

More ASP.NET Interview Questions

what is SQL cache Invalidation?

1 Answers  


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

0 Answers   BirlaSoft,


what is the cursor

1 Answers   Wipro,


What is the relationship between IIS and ASP.NET in the generation of dynamic Web sites?

1 Answers  


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.

6 Answers   CTS,


What role “#&&” plays in a querysting?

0 Answers  


What is difference between ASP and ASP.NET ?

3 Answers   TCS,


What does ascx stand for?

0 Answers  


Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?

0 Answers   Siebel,


What is custom control. What is the difference between custom control and user control ?

1 Answers   Microsoft, Synergy,


Categories