I have a gridview surrounded by buttons adding export functionality to Word, Excel, PDF, CSV/TXT. The code origins from:
and was easily applied. Now, while the first 3 works like a charm, the CSV/TXT exports nicely enough, but the encoding goes *poof* so some - in my case Scandinavian - characters looks anything but Scandinavian. A screenshot on the aforementioned page indicates, that its not my use, but a general problem in this code (found below) I have been experimenting with response.charset and response.contentencoding with no luck. Does anyone here have a clue (or an alternative solution)
Protected Sub btnExportCSV_Click(ByVal sender As Object, ByVal e As EventArgs)
Response.Buffer = True
Response.Charset = ""
Response.ContentType = "application/text"
GridView1.AllowPaging = False
Dim sb As New StringBuilder()
For k As Integer = 0 T
View Complete Post