Click here to Skip to main content
15,894,460 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: get the client hostname or ip address using asp.net Pin
Felipe Dalorzo31-Oct-07 10:44
Felipe Dalorzo31-Oct-07 10:44 
QuestionOpening new window from C# code Pin
kaliem31-Oct-07 3:49
kaliem31-Oct-07 3:49 
AnswerRe: Opening new window from C# code Pin
Not Active31-Oct-07 5:39
mentorNot Active31-Oct-07 5:39 
GeneralRe: Opening new window from C# code Pin
kaliem31-Oct-07 7:33
kaliem31-Oct-07 7:33 
GeneralRe: Opening new window from C# code Pin
Not Active31-Oct-07 9:04
mentorNot Active31-Oct-07 9:04 
Questiongridview Pin
strDesniBek31-Oct-07 3:36
strDesniBek31-Oct-07 3:36 
AnswerRe: gridview Pin
Braulio Dez31-Oct-07 3:42
Braulio Dez31-Oct-07 3:42 
QuestionStrange characters when exporting data Pin
Davy Maes31-Oct-07 3:27
Davy Maes31-Oct-07 3:27 
I use this VB.NET code in my webproject to export a datatable to an Excel file. The characters é,ä, ... are shown in the Access database, I fill the datatable with the content of a table from the database and export it to Excel. In Excel é, ä, ... are replaced with strange characters... Does anyone know why this happens?

Inherits System.Web.UI.Page
Dim oConn As clsRoot

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim oLog As New clsLog(clsLog.LogLevel.Warning, Server.MapPath("log/contacten.log"))
oConn = New clsRoot(Server.MapPath("link/contacten.udl"), oLog)

oConn.Open()

Dim dt As DataTable = oConn.getContacten()
Response.ContentType = "application/ms-excel"
Response.AddHeader("Content-Disposition", "inline;filename=contacten.xls")
Response.Write(ConvertDtToTDF(dt))
End Sub

'Converts a DataTable to Tab Delimited Format
Private Function ConvertDtToTDF(ByVal dt As DataTable) As String
Dim dr As DataRow, ary() As Object, i As Integer
Dim iCol As Integer

'Output Column Headers
For iCol = 0 To dt.Columns.Count - 1
Response.Write(dt.Columns(iCol).ToString & vbTab)
Next
Response.Write(vbCrLf)

'Output Data
For Each dr In dt.Rows
ary = dr.ItemArray

For i = 0 To UBound(ary)
Response.Write(ary(i).ToString & vbTab)
Next

Response.Write(vbCrLf)
Next
End Function
QuestionAJAX Enabled website Pin
Imthu31-Oct-07 3:21
Imthu31-Oct-07 3:21 
AnswerRe: AJAX Enabled website Pin
Imran Khan Pathan31-Oct-07 3:31
Imran Khan Pathan31-Oct-07 3:31 
GeneralRe: AJAX Enabled website Pin
Imthu31-Oct-07 4:55
Imthu31-Oct-07 4:55 
GeneralRe: AJAX Enabled website Pin
Imthu31-Oct-07 5:00
Imthu31-Oct-07 5:00 
AnswerRe: AJAX Enabled website Pin
Sarani Ravindran1-Nov-07 0:04
Sarani Ravindran1-Nov-07 0:04 
Questiondropdownlist Pin
venky45631-Oct-07 3:09
venky45631-Oct-07 3:09 
AnswerRe: dropdownlist Pin
Imran Khan Pathan31-Oct-07 3:15
Imran Khan Pathan31-Oct-07 3:15 
GeneralRe: dropdownlist Pin
Sarfaraj Ahmed31-Oct-07 3:20
Sarfaraj Ahmed31-Oct-07 3:20 
GeneralRe: dropdownlist Pin
Imran Khan Pathan31-Oct-07 3:26
Imran Khan Pathan31-Oct-07 3:26 
AnswerRe: dropdownlist Pin
Arif patel31-Oct-07 3:27
Arif patel31-Oct-07 3:27 
GeneralRe: dropdownlist Pin
Kasi Viswanathan31-Oct-07 3:46
Kasi Viswanathan31-Oct-07 3:46 
GeneralRe: dropdownlist Pin
Arif patel31-Oct-07 3:59
Arif patel31-Oct-07 3:59 
Questioninsert statements Pin
Paul McGann31-Oct-07 2:58
professionalPaul McGann31-Oct-07 2:58 
QuestionServer did not recognize the value of HTTP Header SOAPAction: http:// Pin
PavanPareta31-Oct-07 2:37
PavanPareta31-Oct-07 2:37 
Questionhttp request error Pin
ybasha31-Oct-07 2:34
ybasha31-Oct-07 2:34 
QuestionFaxing service Pin
SreejithAchutan31-Oct-07 2:32
SreejithAchutan31-Oct-07 2:32 
AnswerRe: Faxing service Pin
John-ph31-Oct-07 3:15
John-ph31-Oct-07 3:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.