AJAX - Sys.WebForms.PageRequestManagerParserErrorException

J

jobs

I've got a masterpage with a custom control that has a calendar. when
dates on the calendar are selected, it sets a session variable. that
calender is on every page via the master page. In the home page, that
session variable is used as a param for a grdiview where eventlog
records for the day are displayed. The gridview is on the homepage
under a content tag. In data input web form pages, we use that calendar
as a datepicker for date fields. The logic works great, except, its
terrible if looking for dates accross years and months as the calendar
causes a postback everytime
month arrows are selected.

Anyways, I thought this might be a good place to implement ajax,
wrapping the calender (under the customcontrol under the master page)
in an updatepanel.

changes appeared to have the desired effect as switching months no
longer flashes the entire page. things looked very promising until I
went to test.

In other pages, selecting calendar dates has no bad effect, however in
the home page, where the eventlog grid should be displaying, I get:

Sys.WebForms.PageRequestManagerParserErrorException:The message
received from the server could not be parsed.

Kinda curious, In this case, the calendar when a date is selected,
should be resulting in a postback or somethign so the grid rebinds..
I'm kinda confused. perhaps I need a trigger or a condition? Keep in
mind all the calendar is really doing is setting a session variable.

Thanks for any help or information.
 
G

gregfocker

Having "Response.Write" in the code behind in an event that is fired on
an Async postback (Page_Load, Render, etc.) will cause this error.
Basically, code that changes the Response will cause the problem.

This apparently didn't become an issue until Beta 2. Changing
Response.Write ("blah blah") to MyLiteral.Text = "blah blah" will get
around it. Not feasible for me, however (WAY too many *.Write*()
calls).

Anyone know of a solution, or if MS will fix this? It wasn't a problem
at one time, after all.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top