Return an XML string from aspx page

Joined
Oct 25, 2007
Messages
2
Reaction score
0
HI All,
I have created a web service which I do not want to expose on internet so I have created an interface suppose Interface.aspx
which calls the webmethod and user has access to this page and sends the input XML string as querystring.
Now by passing the input XML string I call the web service and then web service returns the XML to Interface.aspx and in this page I have a textarea.
But when I call it from client application I shoul get the XML only(returned by web service) where as I am getting following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">^M
^M
<html xmlns="http://www.w3.org/1999/xhtml" >^M
<head><title>^M
Untitled Page^M
</title></head>^M
<body>^M
<form name="form1" method="post" action="Interface.aspx" id="form1">^M
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJMjgzMDgzOTgzZGS0Z6oZ670UiJb9JiWWT1fYreD0tQ==" />^M
^M
<div>^M
</div>^M
<textarea name="txtOutputString" rows="10" cols="20" id="txtOutputString">&lt;?xml version=&quot;1.0&quot;?&gt;&lt;error&gt;&lt;id&gt;&lt;/id&gt;&lt;message&gt;An Unexpected error has occured. &lt;/message&gt;&lt;/error&gt;</textarea>^M
^M
</form>^M
</body>^M
</html>^M

Please help me to return XML only not HTML stuff.
Thanks in advance...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top