jamppi
asked on
sqlserver query to output xml into asp.net page
Hi!
i Have simple data connection like this
Dim GetDataQry As String = "SELECT * from facilities where ItemID=@ItemId FOR XML PATH"
Dim cmd As New SqlClient.SqlCommand(GetDa taQry, conn)
with a SqlDataReader.
but it outputs only text. not xml as the query requests.
how do i get it to output xml into a asp.net page.
i Have simple data connection like this
Dim GetDataQry As String = "SELECT * from facilities where ItemID=@ItemId FOR XML PATH"
Dim cmd As New SqlClient.SqlCommand(GetDa
with a SqlDataReader.
but it outputs only text. not xml as the query requests.
how do i get it to output xml into a asp.net page.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Response.ContentType = "text/xml"
then i got it right!
/J