Solved

Write XML to the output stream from an ASP.NET web site

Posted on 2006-06-22
6
741 Views
Last Modified: 2008-02-01
I have an ASP.NET web site using VB.NET and I would like to dump XML to the output stream.  For example,

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    dim dataset1 as New Data.DataSet=getbudgets()
    response.Write(dataset1 as xml)           'this is the part that doesn't work
End Sub





I have to think this can be done since an ASP.NET XML web service consists of functions like

<WebMethod()> _
    Public Function getSystemLog(ByVal FromDate As Date, ByVal ToDate As Date) As SystemLogEntryType()
        Dim retval(1) As SystemLogEntryType

and they spit out XML
0
Comment
Question by:stev0931
  • 3
  • 3
6 Comments
 
LVL 26

Accepted Solution

by:
Rejojohny earned 500 total points
Comment Utility
response.Write(dataset1.getxml()) should work ..

Rejo
0
 

Author Comment

by:stev0931
Comment Utility
Great!  By any chance, do you know how to do this for an arbitrary object type?
0
 
LVL 26

Expert Comment

by:Rejojohny
Comment Utility
what is an arbitrary object type??
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:stev0931
Comment Utility
For example,

class DataType

public ID as long
public Name as string
public Description as string
...

end class
0
 
LVL 26

Assisted Solution

by:Rejojohny
Rejojohny earned 500 total points
Comment Utility
i do not think there is any generic way of converting a class to xml ..
0
 

Author Comment

by:stev0931
Comment Utility
Thanks!  I've got a solution working now...
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now