Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-09-2009, 07:08 PM   PM User | #1
dprichard
Regular Coder

 
Join Date: Jul 2004
Location: Tampa
Posts: 221
Thanks: 22
Thanked 0 Times in 0 Posts
dprichard is an unknown quantity at this point
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
dprichard is offline   Reply With Quote
Old 04-10-2009, 03:03 PM   PM User | #2
Freon22
Regular Coder

 
Freon22's Avatar
 
Join Date: May 2005
Location: USA
Posts: 287
Thanks: 3
Thanked 5 Times in 5 Posts
Freon22 will become famous soon enough
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.
Freon22 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:37 PM.


Advertisement
Log in to turn off these ads.