EXCEL
Response.Clear() Dim DosyaAdi As String = "Blog" Response.AddHeader("content-disposition", "attachment;filename=" & DosyaAdi & ".xls") Response.ContentType = "application/vnd.xls" Response.Charset = "1254" Dim stringWrite As New System.IO.StringWriter() Dim htmlWrite As New HtmlTextWriter(stringWrite) DWGunlukAyrinti.RenderControl(htmlWrite) Response.Write(stringWrite.ToString()) Response.End()
WORD
Response.Clear() Dim DosyaAdi As String = "Blog" Response.AddHeader("content-disposition", "attachment;filename=" & DosyaAdi & ".doc") Response.ContentType = "application/vnd.doc" Response.Charset = "1254" Dim stringWrite As New System.IO.StringWriter() Dim htmlWrite As New HtmlTextWriter(stringWrite) DWGunlukAyrinti.RenderControl(htmlWrite) Response.Write(stringWrite.ToString()) Response.End()
Buarada asagidaki olayida eklememiz gerekiyor
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As System.Web.UI.Control) End Sub
Yazılım | 0 Yorum | 01.03.2008 09:54:14 Etiketler: Etiket Eklenmemiş