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

To make Cache item dependent on a file,directory or other cached item ,you should create an instance of which clause?

1 Answers  


What are the asp.net 2.0 features?

0 Answers  


What is the difference between login controls and forms authentication?

0 Answers  


What is the main difference between Asp.net and Vb.net?

0 Answers  


Is it possible to change the index of primary key on table?

0 Answers  


how can u display multi language (i.e english,spanish...) web site?

2 Answers  


What is localhost in asp.net?

0 Answers  


What is a SESSION and APPLICATION object?

0 Answers  


To display data in a Repeater control which template you provide?

0 Answers   Siebel,


what is .net

15 Answers   Net Solution,


What is the equivalent of date() and time() in asp.net?

0 Answers  


What is gacutil.exe? Where do we store assemblies, Should sn.exe be used before gacutil.exe?

2 Answers   Accenture, Aptech,


Categories