Hello,
I just downloaded AJAX Beta 1, I have not used any of the previous Atlas version and this is my first stab at Microsoft's AJAX, on my dev machine and on the production machine I consistently get this same error message when a postback should occur from a dropdownlist:
"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed"
I have search high and low on these forums and I can't seem to find a resolution to this. Here is the code on my aspx page that shows the scriptmanager and updatepanel:
<asp:ScriptManager id="scmAddItem" runat="server" EnablePartialRendering="True" />
<asp:UpdatePanel id="pnlCategory" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
Item Base Category : <asp:DropDownList ID="cmbItemCategory" AutoPostBack="true" OnSelectedIndexChanged="cmbItemCategory_IndexChanged" runat="server"></asp:DropDownList><br />
Choose Sub Category <asp:DropDownList ID="cmbSubCategory" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
As you can see, I have one dropdown, that when changed should fire the OnSelectedIndexChanged event, but this doesnt seem to happen, I just consistently get the above error message. I copied the sample web.config and placed the dll's in the bin folder with no results.
Anyone come across this before? Any help would be greatly appreciated.
Thanks
Sean
This weekend many people have problems with ASP.NET 2.0 AJAX, thanks Scott Guthrie for releasing something on Friday!
Do you have the problem in every page or just one? Because looks like the project is not set up properly. Got a post about setting up the Atlas projects, however I need to see if still applies to the new ASP.NET 2.0 AJAX (name to long)
http://alpascual.com/blog/al/archive/2006/07/12/Setting-up-Atlas-to-existing-Web-Projects-without-using-the-template-_2800_-Visual-Studio-2005-_2900_-.aspx
Please, let me know if that helps you, if not, I'll update the article with a new set up for ASP.NET 2.0 AJAX ( What about just calling it Atlas?)
Ok,
This is what I have found out so far, If I create a new page, and put my updatepanel in it, it updates properly as expected.
It seems to only be a problem with this one page in peticular where I have a series of complex steps setup, I was trying to add ajax functionality to it and I can't seem to get around the error message I am receiving, i am thinking perhaps it is something with ViewState?
I am doing some more testing now, and I will report back when I find the cause.
Quite strange.
I dont know if it is right solution. I had same problem. If you look at your rendered page so there is in JS method forexample
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00$cphCenter$UpdatePanel1'], [], [], 90); , but no tctl00$cphCenter$UpdatePanel1 object isn't on page. So when i am rendering the page i replace tctl00$cphCenter$UpdatePanel1 with right id ctl00$cphCenter$UpdatePanel1 without t at the begining and there is no error no more.
Hope this helps. If not so sorry.
Well it seems that that T is there rightly. I have read MicrosoftAjaxWebForms.js and found it but for the moment i don't understand it. So sorry
No comments:
Post a Comment