IDeploy

adventures of a geek without a parachute

  Home  |   Contact  |   Syndication    |   Login
  35 Posts | 1 Stories | 41 Comments | 207 Trackbacks

News

Archives

Post Categories

Image Galleries

________

Articles

Blogroll

Humor

 Send a datagrid to the browser in excel format.....

 

Response.ContentType = "application/vnd.ms-excel"
        Response.Charset = ""
        Response.Clear()
        Me.EnableViewState = False
        Dim sw As New StringWriter()
        Dim hw As New HtmlTextWriter(sw)
        Me.DataGrid1.RenderControl(hw)
        Response.Write(sw)
        Response.End()

posted on Wednesday, June 22, 2005 1:11 PM