Click here to Skip to main content
15,902,846 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In my application I need to POST the form Inventory.aspx to a page called proxy.aspx.

Inventory.aspx has a hidden button whose POSTBACKURL is updated as proxy.aspx.

At the clientside, through javascript the click on the the hidden button is executed
document.getElementById("hidBTN").click();


All works find I can find that form is posted to proxy.aspx.

Inventory.aspx has no of controls and one of those is the following
<input id="ReportXML"  type="hidden"  name="hiddenXML"  runat="server"  value=""  /> 


If the value of this input variable is updated as
$get('ReportXML').value = "<newdataset></newdataset>";

my form does not post at all.

So I change the value of < by &l t ; and > as & g t ; then my form posts but then at the proxy page I need to replace the & l t ; with < and & g t ; by > and then parse through the xml. I don't like this approach.

Can I post my form with the control whose value is of xml string without replacing the < and > symbols. Note that I need to post other controls also whose values are not XML strings?

Could anybody guide in this? It would be better if I can keep the POSTING by clicking of the button whose POSTBACK url is given as proxy.

Thanks.
Posted
Updated 14-Jul-11 7:11am
v2

1 solution

Check out the HttpServerUtility Class[^] specifically the HtmlEncode and HtmlDecode methods
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900