473,757 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

response.write giving error

Hi,

I'm working on an application whose code was written by some other developer
and I dont completely understand its source code right now. In one of the
pages where I'm writing a test code, at the end of the Page_Load event I
write a simple following line:
if (IsPostBack)
{
Response.Write( "say");
}

If I write this code, than this page gives the following error in a message
box:

"Sys.WebForms.P ageRequestManag erParserErrorEx ception: The message received
from the server could not be parsed. Common causes for this error are when
the response is modified by calls to Response.Write( ), response filters,
HttpModules, or server trace is enabled.

Details: Error parsing near 'say1415|update Panel|'."

What does this mean and how can I fix this? In a normal new asp.net project
that I make and if I write the same code as above, this gets executed fine.

Regards,

...ab

Aug 26 '08 #1
4 4435
On 26 Aug, 12:48, "Abubakar" <emailallr...@y ahoo.comwrote:
Hi,

I'm working on an application whose code was written by some other developer
and I dont completely understand its source code right now. In one of the
pages where I'm writing a test code, at the end of the Page_Load event I
write a simple following line:
if (IsPostBack)
{
* Response.Write( "say");

}

If I write this code, than this page gives the following error in a message
box:

"Sys.WebForms.P ageRequestManag erParserErrorEx ception: The message received
from the server could not be parsed. Common causes for this error are when
the response is modified by calls to Response.Write( ), response filters,
HttpModules, or server trace is enabled.

Details: Error parsing near 'say1415|update Panel|'."

What does this mean and how can I fix this? In a normal new asp.net project
that I make and if I write the same code as above, this gets executed fine.

Regards,

..ab
Hi

I've not seen this before but I'm not altogether surprised that it has
arisen. Response.Write( ) sends raw characters to the output stream
which may or may not constitute coherent data when combined with the
rest of the page content.

If you wish to put raw text onto the page then use a Literal control.
Aug 26 '08 #2
>If you wish to put raw text onto the page then use a Literal control.

I did use a Literal control but it was not showing up on that page, doesnt
exists if I view the source of the page and thats why I chose the
response.write.

I used the following code:

LiteralControl lc = new LiteralControl( );
//lc.Text = "<script>alert( 'helllo')</script>";
//lc.Text = "<div>hello <br/>world</div>";
Controls.Add(lc );

I tried both of the commented lines and the litral control didnt show up.
But than I dragged one literal control from the toolbox and placed it inside
one of the controls/tables and than assigned its text property through code
and my text shows up there.

"Stan" <go********@phi lhall.netwrote in message
news:2e******** *************** ***********@z6g 2000pre.googleg roups.com...
On 26 Aug, 12:48, "Abubakar" <emailallr...@y ahoo.comwrote:
Hi,

I'm working on an application whose code was written by some other
developer
and I dont completely understand its source code right now. In one of the
pages where I'm writing a test code, at the end of the Page_Load event I
write a simple following line:
if (IsPostBack)
{
Response.Write( "say");

}

If I write this code, than this page gives the following error in a
message
box:

"Sys.WebForms.P ageRequestManag erParserErrorEx ception: The message received
from the server could not be parsed. Common causes for this error are when
the response is modified by calls to Response.Write( ), response filters,
HttpModules, or server trace is enabled.

Details: Error parsing near 'say1415|update Panel|'."

What does this mean and how can I fix this? In a normal new asp.net
project
that I make and if I write the same code as above, this gets executed
fine.

Regards,

..ab
Hi

I've not seen this before but I'm not altogether surprised that it has
arisen. Response.Write( ) sends raw characters to the output stream
which may or may not constitute coherent data when combined with the
rest of the page content.

If you wish to put raw text onto the page then use a Literal control.
Aug 26 '08 #3
Ok you have some AJAX here and as the page sends something as part of the
generated markup flow at an unappropriate place, the resultig output is not
understood by the client side AJAX library...

To me it lloks like some kind of debugging message that could be
commented...

--
Patrice

"Abubakar" <em**********@y ahoo.coma écrit dans le message de groupe de
discussion : OD************* *@TK2MSFTNGP02. phx.gbl...
Hi,

I'm working on an application whose code was written by some other
developer and I dont completely understand its source code right now. In
one of the pages where I'm writing a test code, at the end of the
Page_Load event I write a simple following line:
if (IsPostBack)
{
Response.Write( "say");
}

If I write this code, than this page gives the following error in a
message box:

"Sys.WebForms.P ageRequestManag erParserErrorEx ception: The message received
from the server could not be parsed. Common causes for this error are when
the response is modified by calls to Response.Write( ), response filters,
HttpModules, or server trace is enabled.

Details: Error parsing near 'say1415|update Panel|'."

What does this mean and how can I fix this? In a normal new asp.net
project that I make and if I write the same code as above, this gets
executed fine.

Regards,

..ab
Aug 26 '08 #4
On 26 Aug, 13:52, "Abubakar" <emailallr...@y ahoo.comwrote:
If you wish to put raw text onto the page then use a Literal control.

I did use a Literal control but it was not showing up on that page, doesnt
exists if I view the source of the page and thats why I chose the
response.write.

I used the following code:

LiteralControl lc = new LiteralControl( );
//lc.Text = "<script>alert( 'helllo')</script>";
//lc.Text = "<div>hello <br/>world</div>";
Controls.Add(lc );

I tried both of the commented lines and the litral control didnt show up.
But than I dragged one literal control from the toolbox and placed it inside
one of the controls/tables and than assigned its text property through code
and my text shows up there.

"Stan" <googles...@phi lhall.netwrote in message

news:2e******** *************** ***********@z6g 2000pre.googleg roups.com...
On 26 Aug, 12:48, "Abubakar" <emailallr...@y ahoo.comwrote:


Hi,
I'm working on an application whose code was written by some other
developer
and I dont completely understand its source code right now. In one of the
pages where I'm writing a test code, at the end of the Page_Load event I
write a simple following line:
if (IsPostBack)
{
Response.Write( "say");
}
If I write this code, than this page gives the following error in a
message
box:
"Sys.WebForms.P ageRequestManag erParserErrorEx ception: The message received
from the server could not be parsed. Common causes for this error are when
the response is modified by calls to Response.Write( ), response filters,
HttpModules, or server trace is enabled.
Details: Error parsing near 'say1415|update Panel|'."
What does this mean and how can I fix this? In a normal new asp.net
project
that I make and if I write the same code as above, this gets executed
fine.
Regards,
..ab

Hi

I've not seen this before but I'm not altogether surprised that it has
arisen. Response.Write( ) sends raw characters to the output stream
which may or may not constitute coherent data when combined with the
rest of the page content.

If you wish to put raw text onto the page then use a Literal control.- Hide quoted text -

- Show quoted text -
Hi Abubakar

Sorry it's been so long since you replied.

I don't think I made myself clear in suggesting a Literal control.

The control needs to be declarative, not created programmaticall y.

e.g.

page source:

<form id="Form1" runat="server">
<div>
....

<asp:literal ID="ALiteral" runat="server" ></asp:literal>

....

code behind:

ALiteral.text = "<p>Hello world</p>"

If as Patrice suggested you are using Ajax then I bow out due to lack
of experience.
Sep 6 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1465
by: Colin Colin | last post by:
I have an ASP program that is getting an error. When I get the error I get Page Cannot Be Displayed along with the line that causes the error and what the error is. What I am not getting is any data that I write via response.write before the error occurs. The error is happening in a loop, on the third line below: RESPONSE.WRITE("x=" & x & ", " & aFieldsData(UpdateRecNum,x) & "<BR>") tFLD = trim(aFieldsData(UpdateRecNum,x)) tFLD =...
9
6339
by: msuk | last post by:
All, I have a well form block of XML that is stored in a C# string type and I just simply want to display it in the browser using Response.Write but when I try this I get the following error: The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
5
17390
by: Tammy | last post by:
Hi, I have an aspx app which needs to post data to a form and read the response. I am confused on whether I should be using the get_url using "POST" method or the post_url using "GET" method. string get_url = "http://scmvs4:9090/gtccinfo/H485W020.HTML"; --url contains a form string post_url = "http://scmvs4:9090/cgi-bin/gticglnk/P485VEGA"; --called by get_Url upon submit
5
4294
by: Michael | last post by:
Hello, I have a separate Database class that handles any database work that all my asp.net pages can use. My problem is, many times I use try/catch to catch errors, and I want to output these errors to the webpage with response.write(). Unfortunately Response.anything from within my class generate a "Response is not declared" error. How can I get Response to work from within a class, or is there a better way to handle errors in...
12
7915
by: Jim Rodgers | last post by:
I have a big asp file that has an error under certain conditions -- totally repeatable. However, it only fails when I set response.buffer = True at the top. WHen I set it False in order to debug it, it works every time! I even set it to True, but did a .Flush just before the error, and the error won't happen. It only happens when response.buffer is True and no .response.flush is issued. The error is a string variable turns-up empty...
1
6337
by: Gurpal | last post by:
I'm getting this error when I test this page. Here is the error: Response object error 'ASP 0251 : 80004005' Response Buffer Limit Exceeded /test/test4.asp, line 0 Execution of the ASP page caused the Response Buffer to exceed its configured limit.
6
7133
by: Luke Davis | last post by:
I can't figure this out, why am I getting ")" expected and ";" expected on this line? Response.Write("<input type=""hidden"" name=""item_number"" value="".COM, MLSNumber"">"); - L
6
3556
by: mike.gilmore | last post by:
Hi, I'm trying to move all my custom validation code into the master page. Unfortunately anytime I use the response, request, or trace objects in any master page module (other than page_load), " Object reference not set to an instance of an object." is the error I receive. Below is a sample of code that will not work on my web server. Any suggestions/advice are appreciated.
7
3310
by: Jim in Arizona | last post by:
I'm brand new at ajax. In fact, about 20 minutes ago was the first time I got it to work. The problem I'm having on another page did not work, however. I'm running into the following error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server...
0
9487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9904
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9735
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8736
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7285
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.