Solved

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

Posted on 2009-04-13
2
750 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

Suggested Solutions

Title # Comments Views Activity
Replace &lt; with < 14 56
Visual Studio TFS - how do I check in my code? 2 29
Wav problem 4 16
ASP.NET gridview select textbox on focus 2 0
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now