Response.contentType = "Application / VND.MS-Excel";
Response.charset = "GB2312";
Response.Appendheader ("Content-Disposition", "Attachment; FileName = Updatedatalog.xls");
Response.contentencoding = system.text.Encoding.utf7; // Set the output stream for Simplified Chinese
THIS.ENABLEVIEWSTATE = false;
System.io.stringWriter SW = new system.io.stringwriter ();
System.Web.ui.htmlTextWriter HW = new system.web.ui.htmlTextWriter (SW);
INT nCur = this.dgrepair.currentpageindex;
Int nsize = this.dgrepair.pagesize;
THIS.DGREPAIR.Allowpaging = false;
THIS.REPAIRBIND ();
This.dgrepair.renderControl (HW);
// The following recovery paging
THIS.DGREPAIR.Allowpaging = true;
THIS.DGREPAIR.CURRENTPAGEINDEX = NCUR;
this.dgrepair.pageSize = nsize;
/ / Re-bound DataGrid
THIS.REPAIRBIND ();
Response.write (SW.TOString ());
Response.end ();