step 1: clear httpcontext's reponse.
step 2: define content header of httpcontext response object.
step 3: set the response type to application/ms-excel
step 4: create a html table and set its gridlines to gridview gridlines
step 5: convert table row and gridview controls are replaced by literals in table.
step 6: render the table into the htmlwriter
step 7: render the htmlwriter into the response
source: http://mattberseth.com/blog/2007/04/export_gridview_to_excel_1.html
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment