Web Analytics Made Easy -
StatCounter Passing XML from Post into Variable - CodingForum

Announcement

Collapse
No announcement yet.

Passing XML from Post into Variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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)
    
    %>
    David A. Prichard

    Computer Support Tampa - Computer Support Chicago - Technology Blog

  • #2
    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.

    Comment

    Working...
    X