Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to send grid view data from one page to another without using database
Posted

document.getElementById("currentpage_div").innerHTML = window.opener.document.getElementById("clientidofGRID").innerHTML;

// ie,from window.opener.document.getElementById("clientidofGRID") we will get the previous page grid date and assign to a div in new page..
 
Share this answer
 
1.Normally it is not indicated to do that, but it is possible to have access from 2nd form to the 1st one by using Server.Transfer("Your2ndForm.aspx"), so in this way you may access the public data from the 1st form in your 2nd web form page load for example like bellow:
C#
private   void   Page_Load(object   sender,   System.EventArgs   e)
  {
    Your1stWebForm1   firstWebForm;
    firstWebForm=(Your1stWebForm1)Context.Handler;
    firstWebForm.YourGrid... //Accessing your grid!
    //...
  }

2. Better is to try to find anther way of communication, for example if you have a small set of data in your web grid you could cache the data then reuse it in the 2nd grid.

You could find all possible way of communication between web forms of the same web application in the next article: http://dotnetslackers.com/community/blogs/haissam/archive/2007/11/26/ways-to-pass-data-between-webforms.aspx[^]
 
Share this answer
 
1)Gridview Values into DataTable.

2)DataTable into Session.

3)Pass the Session Value into another Page which you want.

4)Receive the Session Value .
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900