In exporting WebGrid, you can use cache to disk feature to reduce memory usage and memory performance enhancement. However, the cache to disk location can be set manually depends on the user needs.
To set different location for CacheToDisk feature in WebGrid
- Drag WebGrid to the WebForm.
- Go to WebGrid properties, server side event.
- Attach the WebGrid Export event into the WebGrid.
- Specify the CacheToDiskLocation property in the local harddisk.
C# Copy Code private void WebGrid1_Export(object sender, ISNet.WebUI.WebGrid.ExportEventArgs e)
{
e.ReportInfo.CacheToDiskLocation = "c:\\ExportPath\\";
}
- Run the project.