-1

Possible Duplicate:
Posting an url-encoded xml to the url

I am trying to post xml document to a url that has a hidden field called "hidden1"

string xml = "<?xml version="1.0"?>
<catalog>
   <book id="bk101">
      <author>Gambardella, Matthew</author>
      <title>XML Developer's Guide</title>
   </book>
</catalog>";


string  myurl=(uri+Server.UrlEncode(str1));
      Response.Write(@"<a input type=""hidden"" name=""hidden1"" value=""myurl""></a>"); 
      Response.Close();

It didnt work because i think myurl string is not being passed correctly. Any ideas how to do it right way?

Community
  • 1
  • 1
user1108282
  • 65
  • 5
  • 10

1 Answers1

0

It looks like you are missing the escape character ('\') before the double quotes for the following lines:

string xml = "<?xml version=\"1.0\"?>
<catalog>
   <book id=\"bk101\">
   ...
HyperDev
  • 56
  • 3