Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to return XML instead of HTML through ASPX?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
How to return XML instead of HTML through ASPX?
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01134489
Message ID:
01134489
Vues:
78
I have a fat client written in VFP which will upload files to an ASPX page on the server which should return an XML string to the client indicating whether files are saved or not.

My problem is that the page returns the HTML page after the XML string as follow:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<VFPData>
<Response>
<Status>
Success
</Status>
</Response>
</VFPData>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
	Untitled Page
</title></head>
<body>
    <form name="form1" method="post" action="Default.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNzgzNDMwNTMzZGSQc7Rjvxv7xvLMkvhEIt5BGRUq9w==" />

    <div>
    
    </div>
    </form>
</body>
</html>
I use Response.Write in Page_load event to send the XML to the client, but I don't want the HTML part. If I remove the HTML code from the page source manually, I get the following when I build the website:
"Validation(): Element HTML occurs too few times."
How do I just return the XML? Web Service is not an option since I need to upload files.
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform