Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem for string xml in textbox

Status
Not open for further replies.

ozane

Technical User
Feb 3, 2005
57
TR
I am creating xml file in the code an i want to see it at the and. but when i send it to textbox i see &gt; and &lt; instead of < and >.
how can i change it??

Dim aa = "<?xml version='1.0' encoding='UTF-8'?>" + _
goes like

&lt;?xml version='1.0' encoding='UTF-8'?&gt;
 
umm...not tested but i think this will work.
Code:
textbox.text = Server.HtmlDecode(&lt;?xml version='1.0' encoding='UTF-8'?&gt;)
 
This seems to work fine for me:
Code:
TextBox1.Text = "<?xml version='1.0' encoding='UTF-8'?>"
If this doesn't work on you machine, you'll either have to HTML encode the text or change the encoding for that particular page.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I am using a 3d party Menu system that has the following in their xml data file:

<?xml version="1.0" encoding="utf-8" ?>

which also, like ca8msm's code, works fine in my aspx pages.
 
Ok guys... thanks.
i was using MagicAjax, and since the textbox was in the ajax panel, it was giving me weird results.
That MagicAjax causes that...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top