Solved

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

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

22 Experts available now in Live!

Get 1:1 Help Now