Solved

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

Posted on 2009-04-13
2
753 Views
Last Modified: 2012-05-06
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
Comment
Question by:JeffEae
  • 2
2 Comments
 
LVL 12

Accepted Solution

by:
Nirmalan Nagenthiran earned 500 total points
ID: 24134501
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
 
LVL 12

Assisted Solution

by:Nirmalan Nagenthiran
Nirmalan Nagenthiran earned 500 total points
ID: 24134520
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question