473,491 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"Downloading" datagrids

Hi all,

I have developed a pretty straightforward web app which displays the results
of a query in a datagrid.

I want to provide a "Download as csv" link, but want to generate this
without having to requery the database.

What's the best way to persist the underlying datatable? It's running on an
intranet and even then not that often. The datatable is around 1000 rows.

Current ideas include passing in viewstate, storing in session or generating
a temp file to serve. What are the pros and cons, and if possible
implementation tips?

Spammy
Nov 19 '05 #1
6 1101
For an intranet solution maybe ViewState is the better approach, as it passes
the data "through the wire".
The session variables reside in the memory and are better approach when
connection overheat is to be avoided.
I would recommend using ViewState!

Hope that helps!
Regards,
Kostadin Kostov

"spammy" wrote:
Hi all,

I have developed a pretty straightforward web app which displays the results
of a query in a datagrid.

I want to provide a "Download as csv" link, but want to generate this
without having to requery the database.

What's the best way to persist the underlying datatable? It's running on an
intranet and even then not that often. The datatable is around 1000 rows.

Current ideas include passing in viewstate, storing in session or generating
a temp file to serve. What are the pros and cons, and if possible
implementation tips?

Spammy

Nov 19 '05 #2
If performance is not critacal for your application you can generate cvs
file using guid filenames each time you generate datagrid.So you only need
to put a link to that generated cvs file.However , you have to write some
delete code in the session_end to delete unnecessary generated cvs files.

"spammy" <me@privacy.net> wrote in message
news:38*************@individual.net...
Hi all,

I have developed a pretty straightforward web app which displays the results of a query in a datagrid.

I want to provide a "Download as csv" link, but want to generate this
without having to requery the database.

What's the best way to persist the underlying datatable? It's running on an intranet and even then not that often. The datatable is around 1000 rows.

Current ideas include passing in viewstate, storing in session or generating a temp file to serve. What are the pros and cons, and if possible
implementation tips?

Spammy

Nov 19 '05 #3
Just taught you might be interested in this;
Infragistics WebGrid control comes with a ExcelExportor.
One line of code with export all data in the grid, even if your using pages,
to the clients PC. It pops up the save as dialog for them.
Real basic, drop the grid on page and the exportor and a btn/btnlink.
Under the btn put the one line of code and your done. Works great :)

Also note for the webgrid make sure you use pages and set page to have no
more then 200 rows at a time. Else speed gets hit real bad.

Also sense your in a intranet take a look at SmartClients. Using their
wingrid here is just awesome. Built in filters, sorting and a few
calculation summarys.

Ok will stop rant now :). It is good though. :)

Deasun
http://www.tirnaog.com

"spammy" wrote:
Hi all,

I have developed a pretty straightforward web app which displays the results
of a query in a datagrid.

I want to provide a "Download as csv" link, but want to generate this
without having to requery the database.

What's the best way to persist the underlying datatable? It's running on an
intranet and even then not that often. The datatable is around 1000 rows.

Current ideas include passing in viewstate, storing in session or generating
a temp file to serve. What are the pros and cons, and if possible
implementation tips?

Spammy

Nov 19 '05 #4
That sounds ideal I guess. I'm not too sure how sessions work though - when
would they expire? I mean suppose the user is reading the onscreen report
(which takes 30 mins), would the csv still be available, or would the
session end code fire?

Viewstate is still an option. I havn't heard anything against using a
session variable though...

Spammy

"Ersin Gençtürk" <ers[spam]@gencturk.org> wrote in message
news:uK**************@tk2msftngp13.phx.gbl...
If performance is not critacal for your application you can generate cvs
file using guid filenames each time you generate datagrid.So you only need
to put a link to that generated cvs file.However , you have to write some
delete code in the session_end to delete unnecessary generated cvs files.

"spammy" <me@privacy.net> wrote in message
news:38*************@individual.net...
Hi all,

I have developed a pretty straightforward web app which displays the

results
of a query in a datagrid.

I want to provide a "Download as csv" link, but want to generate this
without having to requery the database.

What's the best way to persist the underlying datatable? It's running on

an
intranet and even then not that often. The datatable is around 1000 rows.
Current ideas include passing in viewstate, storing in session or

generating
a temp file to serve. What are the pros and cons, and if possible
implementation tips?

Spammy


Nov 19 '05 #5
you can adjust your application's session time out in your web.config
file.If you want you can adjust it for 30 mins.

"spammy" <me@privacy.net> wrote in message
news:38*************@individual.net...
That sounds ideal I guess. I'm not too sure how sessions work though - when would they expire? I mean suppose the user is reading the onscreen report
(which takes 30 mins), would the csv still be available, or would the
session end code fire?

Viewstate is still an option. I havn't heard anything against using a
session variable though...

Spammy

"Ersin Gençtürk" <ers[spam]@gencturk.org> wrote in message
news:uK**************@tk2msftngp13.phx.gbl...
If performance is not critacal for your application you can generate cvs
file using guid filenames each time you generate datagrid.So you only need
to put a link to that generated cvs file.However , you have to write some delete code in the session_end to delete unnecessary generated cvs files.
"spammy" <me@privacy.net> wrote in message
news:38*************@individual.net...
Hi all,

I have developed a pretty straightforward web app which displays the

results
of a query in a datagrid.

I want to provide a "Download as csv" link, but want to generate this
without having to requery the database.

What's the best way to persist the underlying datatable? It's running
on an
intranet and even then not that often. The datatable is around 1000

rows.
Current ideas include passing in viewstate, storing in session or

generating
a temp file to serve. What are the pros and cons, and if possible
implementation tips?

Spammy



Nov 19 '05 #6
Suppose a user keeps browser open and does something else,
after a half hour then click file link. Since the file was
deleted, an error will come out. How to you think this
situation?

Elton Wang
el********@hotmail.com
-----Original Message-----
If performance is not critacal for your application you can generate cvsfile using guid filenames each time you generate datagrid.So you only needto put a link to that generated cvs file.However , you have to write somedelete code in the session_end to delete unnecessary generated cvs files.
"spammy" <me@privacy.net> wrote in message
news:38*************@individual.net...
Hi all,

I have developed a pretty straightforward web app which displays the
results
of a query in a datagrid.

I want to provide a "Download as csv" link, but want to
generate this without having to requery the database.

What's the best way to persist the underlying datatable? It's running onan
intranet and even then not that often. The datatable is
around 1000 rows.
Current ideas include passing in viewstate, storing in session orgenerating
a temp file to serve. What are the pros and cons, and

if possible implementation tips?

Spammy

.

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6973
by: RJ Dake | last post by:
Having problems with uploaded Database and SharePoint sites. At least one of the errors is mentioned below. Sites do not allow access to DB entry or results. Email feedback is MOST appreciated!...
38
5693
by: Haines Brown | last post by:
I'm having trouble finding the character entity for the French abbreviation for "number" (capital N followed by a small supercript o, period). My references are not listing it. Where would I...
43
42733
by: Dimitri Debruyne | last post by:
Hi group I am in the process of developing a website in XHTML Strict and CSS. Is there a way to open a link in a new window without the use of frames or Javascript or something ? I didn't find a...
2
15459
by: CVerma | last post by:
I'm using an html input control (System.web.UI.HTMLControls.HTMLInputFile) to upload files such as msword, excel, jpg, and pdf. I have the encType property set in the form:...
9
1656
by: sophie_newbie | last post by:
Basically I have written a cgi script to automatically download TIFF images of patents from the US patent office. What I want is that the user can see what is happening when the images are being...
1
1214
by: sophie_newbie | last post by:
Basically I have written a cgi script in Python to automatically download TIFF images of patents from the US patent office and create a PDF file of them. What I want is that the user can see...
1
1977
by: mmcc128 | last post by:
Currently using the "document.images" to "preload" images - not for future pages, but for the page being loaded. I got it from http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm Its a...
1
2041
by: alex23 | last post by:
Hey everyone, I'm trying to install setuptools on a work PC behind an NTLM firewall. I've tried to use APS as recommended but am still unable to have anything other than IE talk through...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.