Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add CSV export from a DataTable (HTML)
Message
De
20/08/2005 23:25:31
 
 
À
20/08/2005 16:07:38
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01041954
Message ID:
01042538
Vues:
21
>SNIP
>If you want to do it server-side using a DataTable, you can:
>- re-create the DataTable in the Export method
>- persist the DataTable from an earlier method, and use that
>
>If the latter, I agree with Bonnie, using Session state is one way to persist the DataTable e.g.
// In the method that originally creates the DataTable:
>Session["MyDataTable"] = dt;
>
>// In your Export method:
>DataTable dt = (DataTable)Session["MyDataTable"];
>// need to explicitly cast the Session object back to a DataTable
You'll have to decide if saving the DataTable in Session state is reasonable (not too large, won't hang around too long) and also remember to destroy it when you're finished with it.


Thanks. It was the latter one, about Session state as Bonnie said. I knew all the previous ones. :)


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform