• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 786
  • Last Modified:

Gridview on one page, transferring values to a formview on another page.

Hi guys,

If I have a gridview on one page, and I want to transfer values from one row to another page and contain the values in a formview, what would be the easiest way to accomplish this? I was thinking of using query strings or something like that but not sure.  
0
JeffEae
Asked:
JeffEae
  • 2
2 Solutions
 
Nirmalan NagenthiranCommented:
Sore the Row Value in session


//create datatable to store your row
DataTable dt = new DataTable; 
 
DataRow dr = dt.NewRow();   
//set data to the row
dr["ColumnName"] = "some data"; 
Session["DT"] = dt;
 
//Retrieve data in another page through Session
DataTable dt = (DataTable)Session["DT"];

Open in new window

0
 
Nirmalan NagenthiranCommented:
There are different ways to transfer data from one page to another page.

1) response.redirect
2) server.transfer
3) server.execute
4) cookies
5) session

http://geekswithblogs.net/ranganh/archive/2005/04/25/37631.aspx
http://www.daniweb.com/forums/thread82311.html 
http://aspnet.4guysfromrolla.com/articles/050802-1.2.aspx 
http://www.ondotnet.com/pub/a/dotnet/2003/04/07/aspnetnav.html 
http://www.codeproject.com/KB/aspnet/TransferingValues.aspx

 If you need more info check these links..
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now