I added some AJAX code to an input form I was working on, everything was cool and it worked great. Click on the data grid link button, fill in the input form, no screen flicker.
When I put it to the Test environment and started running Watir against the web app in preparation for an update in Production (no -we're not automated here for unit testing - we are working on it though!)
I got this error when the Watir script ran against my new admin form:
"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 servertrace is enabled."
I honestly thought no change had been made to the code, but a very large change was made which I didn't notice at first. The original tested code inherited from System.Web.UI.Page. That was a coding error because the entire application must use a base class - I plugged in the baseclass after testing and before putting it to the Test environment.
So, anyway, in the OnPreInit of the newly plugged in base class is code to set the expiration of the page. This is the code that was breaking my AJAX.
Response.Expires = 0;
Response.ExpiresAbsolute = DateTime.Now.AddMinutes(-1);
Response.AddHeader("pragma", "no-cache");
Response.AddHeader("cache-control", "private");
Response.CacheControl = "no-cache";
I added an override to OnPreInit to fix it. But that was an adventure to find.
So, my post for the week. Nothing going on here but LOTS OF PROGRAMMING ALL THE TIME. My Poor Garden!
//bcp 4/30/2007 if we make this inherit from BasePage class, we must override PreInit,
// because the AJAX doesn't work, Probably because
// the basepage sets the masterpage? heres the 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 servertrace is enabled.
A conglomeration of subjects - I guess I'm just a scattered person.
Monday, April 30, 2007
Friday, April 13, 2007
Spring!

Minnesota living, ahhh, what can I say? April 11th, temperatures below freezing - snowing all day. I tell you, it gets tiresome. I guess it doesn't matter, there's no time for the garden anyway. I did manage a small sketch the other day, Straw Hat in the Green Room. I needed a break so anyway, I like the picture and may find a web site to use it on. I got a break in my Internet Development Business this year, things are opening up for me finally. I had to bootstrap into the business, no doubt. So, on my web site I offer an ecommerce site setup with six pages for 499.00. I put the site into my managed hosting service, which allows the owners up to six page updates a year. It's working out - because I am leveraging all the so very many opensource projects out there to get these sites up quickly. This is a simple way for me to pay for my hosting bill - which I used to have to foot the bill on myself. Today I get to work in the Commerce Starter Kit, I'm finding it nearly perfect for my needs. Very minimal coding changes, just enough to support the different industry the site will be for.
Thursday, April 05, 2007
The Shed
So, our motto on the house has been Reduce, Reuse, Recycle. We've just about finished construction on the house, finished so much in fact that we'll probably not finish completely until we remodel. It's not something I'm proud of, but I do know myself pretty well and the house is just so comfy. ( That's also not mentioning my two jobs I'm working at the moment which ties up every waking hour lately. Actually, this weekend (Easter) is my first weekend off in two and a half months. The kids are coming, can't wait. )
Anyway, back to the subject of this little blog, - I need to get the pictures out of our shed moving adventure. A nice neighbor of ours, about 4 miles away or so, wanted a new shed. We were told of it by a friend of ours, the gentleman was giving away his existing shed so that he could replace it with the new one. Now - the old shed is/was very sturdy, 40 ft. by 60 ft. Insulated, Electrified, on a foundation.
Long story short - we got the variance from our county, permits, hired a house mover, and had it moved to our property to replace the trailer which was what started all our construction in the first place. This shed will be used at our home very completely. Believe me.
I'll get the pics when I can, I happened to be working from home the day they moved it in - I've never seen anything like that big old shed being shoehorned into my yard. So Cool.
Now, how's that for recycling!
Anyway, back to the subject of this little blog, - I need to get the pictures out of our shed moving adventure. A nice neighbor of ours, about 4 miles away or so, wanted a new shed. We were told of it by a friend of ours, the gentleman was giving away his existing shed so that he could replace it with the new one. Now - the old shed is/was very sturdy, 40 ft. by 60 ft. Insulated, Electrified, on a foundation.
Long story short - we got the variance from our county, permits, hired a house mover, and had it moved to our property to replace the trailer which was what started all our construction in the first place. This shed will be used at our home very completely. Believe me.
I'll get the pics when I can, I happened to be working from home the day they moved it in - I've never seen anything like that big old shed being shoehorned into my yard. So Cool.
Now, how's that for recycling!
Subscribe to:
Posts (Atom)
EZBurn Service Network Blog
FriendFeed badge
Subscribe
About Me
- Bobbi Perreault
- Glencoe, Minnesota, United States
- My online Resume I guess. All about Learning Internet and Programming technologies (especially Silverlight! ) Along with some personal tidbits - my paintings. Our Homemade House (every bit of it is homemade). I've worked as a programmer since 1992, first in DOS/Clipper. I earned my MCSE certification in 1999. Although I am somewhat of a Jack of all Trades (I guess) I try to specialize in eCommerce and Web Application development- With a whole lot of SQL Server.