XML Escaping for Textbox

N

Nick

Hey there,

I'm trying to get a textbox (using ASP.NET / VB.NET) to display XML
without freaking out the browser afterwards.

Currently I have the textbox displaying the XML fine, but that's when
things go funny, the second another postback occurs it complains. I thought
that a textbox would have it's contents escaped in on way or another,
obviously not, any idea how I can get the page to ignore it's contents? I
don't want it to use the contents for anything, it's just for the users
convenience.

Error: Sys.WebForms.PageRequestManagerParserErrorException: The message
recieved from the server could not be parsed. Common cause for this error
are when the response is modified by calls to Response.Write(), response
filters, HttpModiles, or server trace is enabled.

Cheers in advance for your time!

Nick.
 
M

Mr. Arnold

Nick said:
Hey there,

I'm trying to get a textbox (using ASP.NET / VB.NET) to display XML
without freaking out the browser afterwards.

Currently I have the textbox displaying the XML fine, but that's when
things go funny, the second another postback occurs it complains. I
thought that a textbox would have it's contents escaped in on way or
another, obviously not, any idea how I can get the page to ignore it's
contents? I don't want it to use the contents for anything, it's just for
the users convenience.

Error: Sys.WebForms.PageRequestManagerParserErrorException: The
message recieved from the server could not be parsed. Common cause for
this error are when the response is modified by calls to Response.Write(),
response filters, HttpModiles, or server trace is enabled.

Cheers in advance for your time!

Turn off ViewState on the TextBox so that the data in the Textbox is not
held onto during the between round trips. That means you'll have to populate
the controls each time on the postback with the XML.
 
S

Steven Cheng [MSFT]

Hi Nick,

Based on your description, my understanding is that you use a TextBox on
page to accept some input and you assign some XML text into the textbox ,
however, when you post back the page, it report some error, correct?

In the error message , I saw the "Sys.WebForms..." component which is
ASP.NET ajax script class. So are you using AJAX in that page to perform
partial postback(non refresh post)? If so, would you provide some further
code logic about how to did the AJAX stuff or an simple example of the page
so that we can also perform test on my side? BTW, have you tried Arnold's
suggestion to see whether it helps?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
 
S

Steven Cheng [MSFT]

Hi Nick,

Have you got any progress on this or is there any other finding?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

--------------------
From: (e-mail address removed) (Steven Cheng [MSFT])
Organization: Microsoft
Date: Mon, 23 Jun 2008 07:05:33 GMT
Subject: RE: XML Escaping for Textbox
 
N

Nick

Hi Steven,

I've found an alternative way to display the information I want without
using a Text box but using an iFrame instead which solves the issue I have
been experiencing.

Thanks a million for your time and help none the less.

Nick.
 
N

Nick

Hey there,

For some reason this post only just appeared! I blame Outlook Express.

Anyway thanks a million for the tip, I thought there must be some way of
excluding it, that's great, cheers.

Nick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top