Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2004
    Location
    Tampa
    Posts
    223
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Passing XML from Post into Variable

    I have a form on one page that submits a value with XML like this:

    <url>www.thisurl.com</url>

    I am pulling it into another page and try to write it out, but all I get is this:

    www.thisurl.com instead of <url>www.thisurl.com</url>

    I am not sure what I need to do to get this working.

    Code:
    <%
    
    Dim basketXML
    
    basketXML = Request.Form(basketXML)
    
    Response.Write(basketXML)
    
    %>

  • #2
    Regular Coder Freon22's Avatar
    Join Date
    May 2005
    Location
    USA
    Posts
    287
    Thanks
    3
    Thanked 5 Times in 5 Posts
    I am not sure what you are doing but <url></url> is html so it will not display on a page. If you want to display the html then you are going to have to do something like this.

    Response.Write(HttpUtility.HtmlEncode("<url>Test</url>"));
    Or in your case
    Response.Write(HttpUtility.HtmlEncode(basketXML)

    Hope this helps.
    I was wondering why frisbees got bigger as they got closer, then it hit me.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •