Click here to Skip to main content
15,914,221 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAlert message Pin
deep77-Jun-07 0:42
deep77-Jun-07 0:42 
AnswerRe: Alert message Pin
M. J. Jaya Chitra7-Jun-07 0:47
M. J. Jaya Chitra7-Jun-07 0:47 
GeneralRe: Alert message Pin
deep77-Jun-07 1:10
deep77-Jun-07 1:10 
GeneralRe: Alert message Pin
M. J. Jaya Chitra7-Jun-07 1:18
M. J. Jaya Chitra7-Jun-07 1:18 
GeneralRe: Alert message Pin
l0kke7-Jun-07 4:09
l0kke7-Jun-07 4:09 
QuestionFileMaker Processing Pin
M. J. Jaya Chitra7-Jun-07 0:23
M. J. Jaya Chitra7-Jun-07 0:23 
QuestionHiddening Tree View(Navigation) through Javascript Pin
varshavmane7-Jun-07 0:18
varshavmane7-Jun-07 0:18 
QuestionXmlTextWriter Pin
Brendan Vogt7-Jun-07 0:16
Brendan Vogt7-Jun-07 0:16 
Hi,

I am using VB.NET 1.1 and I am trying to write XML data to the browser window. It doesn't write it like an XML file, but more like text, all in one row.

My code behind looks like this:

Dim writer As New XmlTextWriter(Response.OutputStream, Encoding.UTF8)

writer.WriteStartDocument()
writer.WriteStartElement("userInfo")

writer.WriteStartElement("browserInfo")

writer.WriteElementString("userAgent", Request.UserAgent)
writer.WriteElementString("userLanguages", String.Join(", ", Request.UserLanguages))

writer.WriteEndElement()

writer.WriteStartElement("visitInfo")
writer.WriteAttributeString("timeVisited", DateTime.Now.ToString())
writer.WriteElementString("ip", Request.UserHostAddress)
writer.WriteElementString("rawUrl", Request.RawUrl)
writer.WriteEndElement()

writer.WriteEndElement()
writer.WriteEndDocument()
writer.Close()

Response.ContentEncoding = Encoding.UTF8
Response.ContentType = "text/xml"
Response.End()

I've searched high and low for an answer, but no luck. Please can some advise??

Regards
ma se
AnswerRe: XmlTextWriter Pin
Not Active7-Jun-07 2:32
mentorNot Active7-Jun-07 2:32 
QuestionHow to Select only Excel File Types Pin
meeram3957-Jun-07 0:08
meeram3957-Jun-07 0:08 
AnswerRe: How to Select only Excel File Types Pin
Manas Bhardwaj7-Jun-07 0:25
professionalManas Bhardwaj7-Jun-07 0:25 
Questionhow to call dynamic page Pin
harithadotnet7-Jun-07 0:05
harithadotnet7-Jun-07 0:05 
AnswerRe: how to call dynamic page Pin
ASPnoob7-Jun-07 17:35
ASPnoob7-Jun-07 17:35 
Questionnot able to view data in controls between postbacks when data binded to controls using xmlhttprequest object Pin
madhoo27-Jun-07 0:01
madhoo27-Jun-07 0:01 
AnswerRe: not able to view data in controls between postbacks when data binded to controls using xmlhttprequest object Pin
Sylvester george7-Jun-07 3:00
Sylvester george7-Jun-07 3:00 
GeneralRe: not able to view data in controls between postbacks when data binded to controls using xmlhttprequest object Pin
madhoo27-Jun-07 5:24
madhoo27-Jun-07 5:24 
GeneralRe: not able to view data in controls between postbacks when data binded to controls using xmlhttprequest object Pin
Sylvester george7-Jun-07 19:04
Sylvester george7-Jun-07 19:04 
GeneralRe: not able to view data in controls between postbacks when data binded to controls using xmlhttprequest object Pin
madhoo27-Jun-07 19:10
madhoo27-Jun-07 19:10 
GeneralRe: not able to view data in controls between postbacks when data binded to controls using xmlhttprequest object Pin
Sylvester george7-Jun-07 19:20
Sylvester george7-Jun-07 19:20 
Questionchange GridViews ColumnStyles Programmatically in Codebehind Pin
freshonlineMax6-Jun-07 23:39
freshonlineMax6-Jun-07 23:39 
AnswerRe: change GridViews ColumnStyles Programmatically in Codebehind Pin
Manas Bhardwaj7-Jun-07 0:04
professionalManas Bhardwaj7-Jun-07 0:04 
GeneralRe: change GridViews ColumnStyles Programmatically in Codebehind Pin
freshonlineMax7-Jun-07 4:11
freshonlineMax7-Jun-07 4:11 
GeneralRe: change GridViews ColumnStyles Programmatically in Codebehind Pin
Manas Bhardwaj7-Jun-07 4:38
professionalManas Bhardwaj7-Jun-07 4:38 
AnswerRe: change GridViews ColumnStyles Programmatically in Codebehind Pin
ganti.r7-Jun-07 0:54
ganti.r7-Jun-07 0:54 
QuestionChange Datagrid default display page? Pin
.NetRams6-Jun-07 23:20
.NetRams6-Jun-07 23:20 

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.