Return an XML string from aspx page

Discussion in '.NET' started by webnet, Nov 19, 2007.

  1. webnet

    webnet

    Joined:
    Oct 25, 2007
    Messages:
    2
    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...
     
    webnet, Nov 19, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sriram Mallajyosula

    How do I post data from aspx page to another aspx page.

    Sriram Mallajyosula, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    992
    Steve C. Orr [MVP, MCSD]
    Nov 5, 2003
  2. Marco Antonio Montalvo Durán
    Replies:
    2
    Views:
    4,151
    Matt Morris
    Jan 23, 2004
  3. John M
    Replies:
    1
    Views:
    1,192
    Kumar Reddi
    May 29, 2005
  4. =?Utf-8?B?Uk1M?=
    Replies:
    1
    Views:
    574
    =?Utf-8?B?QW5keSBMdWtzaWM=?=
    Sep 16, 2005
  5. Ronald S. Cook

    How properly return XML from an ASPX page?

    Ronald S. Cook, Mar 18, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    4,964
    Karl Seguin [MVP]
    Mar 18, 2006
Loading...

Share This Page