GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET
Go To First  |  Previous Question  |  Next Question 
 ASP.NET  |  Question 79 of 164    Print  
how to load data from one page to another page in asp.net

  
Total Answers and Comments: 9 Last Update: December 19, 2007     Asked by: laxmi 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 27, 2006 07:41:53   #1  
pronobesh        

RE: how to load data from one page to another page in ...
you can load data by cross page post back
 
Is this answer useful? Yes | No
October 12, 2006 09:34:11   #2  
laxmi        

RE: how to load data from one page to another page in ...

hi pronobesh

thanks for ur ans.will u give some more explanation to this question plz.


 
Is this answer useful? Yes | No
October 18, 2006 13:32:01   #3  
cynthia justin        

RE: how to load data from one page to another page in ...
protected PostToAnotherPageSenderCSharp_aspx prev;protected void Page_Load(object sender EventArgs e){ if(PreviousPage ! null) {  prev (PostToAnotherPageSenderCSharp_aspx)PreviousPage;  this.txtCrossPage.Text prev.PublicTxtName; }}

In this method we cast the PreviousPage to an appropriate page since we know which page posted to this page. If you use more than one page to post to a single page you should check if the previous page is casteable to this page using is operator or cast using as operator and check if it is null. After casting since ASP.NET knows which page it is we can reach its method and fields normally. But normally web controls are defined as protected therefore you cannot reach them. What you should do is create a simple public property as shown below to reach the fields. If intellisense does not work here do not worry it works perfectly during runtime.


 
Is this answer useful? Yes | No
October 18, 2006 23:32:02   #4  
Mahesh        

RE: how to load data from one page to another page in ...
You can send data from one page to another page by three ways 1. By usual postback 2. By using querystring3. By using property(get / set accessor)
 
Is this answer useful? Yes | No
October 25, 2006 07:54:26   #5  
ashwnai kumar        

RE: how to load data from one page to another page in ...

There are many ways

In Asp.net2.0 You can use cross page submission.

Using Query String

Using Post

Etc


 
Is this answer useful? Yes | No
June 25, 2007 05:55:16   #6  
Sing        

RE: how to load data from one page to another page in ...
Using the Property ( Get and Set ) we can transfer the value from one page to another page
 
Is this answer useful? Yes | No
November 02, 2007 09:06:08   #7  
learner        

RE: how to load data from one page to another page in ...
cant we use SESSION variable to load data to another page
 
Is this answer useful? Yes | No
December 15, 2007 06:37:23   #8  
JanardanBaghla Member Since: December 2007   Contribution: 2    

RE: how to load data from one page to another page in asp.net
Wecan load data from one page to another page by using these ways:
1.We can pass the data from one page by using context object if we are using server.transfer method to redirect the user.
2.We can use query string
3.We can use session variable
4.We can use crosspage postback for this.
5.By using properties

 
Is this answer useful? Yes | No
December 19, 2007 08:36:21   #9  
trebor Member Since: December 2007   Contribution: 1    

RE: how to load data from one page to another page in asp.net
what about viewstate cache and the good old cookes :)
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape