Output content as excel and display File download box

Scenario:
if you want to output some data as excel file, and display the File download dialog box,
use the code below :

Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition", "attachment;filename=.xls"

Comments

Popular posts from this blog

Error when Installing SQL Server 2008 R2 Management Studio

Windows 7 and GoToMyPC - Configure the Domain Group Policy to allow GoToMyPC to send Ctrl-Alt-Del

Technical Team Lead Interview Questions