 |
| ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application . |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 16th, 2004, 09:15 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to pass bulk data(dataset) between webpages
I badly need to know How to pass bulk data(dataset) between webpages. Please help....
|
|

September 16th, 2004, 09:23 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Please do not crosspost
http://p2p.wrox.com/topic.asp?TOPIC_ID=19282
Hal Levy
Web Developer, PDI Inc.
NOT a Wiley/Wrox Employee
|
|

September 16th, 2004, 12:30 PM
|
|
Registered User
|
|
Join Date: Dec 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You could do this by using the session object
Let's say you have a dataset.
your dataset name is "ds".
Session("dataset") = ds
to retreive.
ds = Session("dataset")
Good Luck!
|
|

September 16th, 2004, 01:48 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
If you retrieve the data from the Session again, you need to type cast it to the appropriate type.
VB.NET:
MyDataSet = CType(Session("dataset"), DataSet)
(or use DirectCast instead of CType)
C#:
MyDataSet = (DataSet) Session("dataset");
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Trash by KoRn (Track 14 from the album: Issues) What's This?
|
|

September 17th, 2004, 12:38 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
But using session for passing dataset(with lot of data)between pages consumes lot of resources. There should be some other way. Do any one know that?. It is important and urgent...Please.....
|
|

September 17th, 2004, 12:53 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
There aren't that many options left if you need to "pass data from page to page":
1. Storing it in a Session is a quick and easy way, but may indeed consume a lot of resources.
2. Store it in the cache. ASP.NET will automatically manage the cache. Once it gets full, it automatically deletes old items (those with the lowest priority). This way, it won't consume as much resources while you can still retrieve the data pretty quick.
3. Get it from the database again. Depending on your query and database server, this may not be as bad as it sounds. Of course it's slower than other methods but it may still be acceptable, performance wise.
Can you please not stress people up with "important and urgent"? Of course it's important and urgent,otherwise you wouldn't be posting here. But what may be important and urgent to you may have no importance to me. So, it's not very likely people are going to respond quicker when you say it's urgent .... Just a thought.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

September 17th, 2004, 09:26 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Regarding Imar's suggestions #2: Good idea, but remember that the cache is then application scope so if the dataset is specific to one user, the cache won't solve the problem.
Can you describe a bit more about how you are getting from one page to another? Depending on how you need to do it there may be a technique that will avoid the use of any of the state collections.
|
|

September 17th, 2004, 09:27 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
I meant to ask: Are you redirecting to the new page? Or is the new page just coming up at some point in a user's session?
|
|

September 20th, 2004, 05:39 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i am using Modal Form Concept.
i have DataGrid in the popUp form.
and want to pass DataGrid values(or Dataset) to
Main(Base)Form.
Server.Transfer method Cannot be Used,Coz
Everytime the requsted form(Parent) is opening as New Page.
So....What is the Solution??????????
|
|

October 3rd, 2004, 11:46 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
If you use some kind of server side solution for this, then you would need your modal form to save the data, then tell the parent page to refresh. That's about the only way you can do it. A client-side solution would entail a good amount of javascript programming.
|
|
 |