I created a web app that retrieves data from a binary column in sql server. In order to convert the data in that column I created an HttpHandler, but I had to pass an ID to the HttpHandler to pull the right row from the database. I decided to pass the ID via the session, but once I added the code for the Session variable I started getting this weird error the very first time I would run my app: "Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. comonn causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled."
I did a lot of looking around on the interwebs and found two sites that eventually landed me a solution I was happy with. This first blog suggested adding EnableEventValidation="False" to the top of the .aspx page, which did stop my error, but I wasn't comforatable doing this. I did some searching through the comments of this second blog and found out that all I needed to do was "initialize" my session variable, and that ended up working really well for me.
Showing posts with label AJAX. Show all posts
Showing posts with label AJAX. Show all posts
Wednesday, April 15, 2009
Friday, March 27, 2009
RequiredFieldValidator + AJAX TabContainer = mild frustration
I ran into a bit of trouble yesterday, but was finally able to decipher the problem and get my app working right today. Here's my set up: I have a page with an AJAX TabContainer (it has two tabs). On one tab there is a TextBox, a Button and a RequiredFieldValidator. The problems began when I added a TexBox and Button to Tab 2. When I click the button on Tab 2 the button_click event wouldn't fire, wouldn't fire, wouldn't fire. I was at a loss. So after systematically removing controls from each tab - I was able to narrow the issue down to the RequiredFieldValidator on Tab 1. So I googled "ajax tabcontainer required field validator" and found this post that really helped a lot and actually ended up making perfect sense. Add a ValidationGroup! Makes PERFECT SENSE!
Subscribe to:
Posts (Atom)