Showing posts with label toolkit. Show all posts
Showing posts with label toolkit. Show all posts

Monday, March 26, 2012

PageRequestManagerParserErrorException, is it due to web farm?

I implemented an ASP.NET 2.0 web application with the ASP.NET AJAX framework and the AJAX Control Toolkit. When I run it in my development pc, it works perfectly. But when it runs on a production server environment, which is a web farm, the following javascript error message prompts frequently on the browser:
Sys.WebForms.PageRequestManagerParserErrorException: This 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 '<!DOCTYPE html P'.
Anybody helps? It's my first project in my current company...

This problem is solved by adding a machinekey to the web.config.

Saturday, March 24, 2012

Paging inside popup

First of all, congratulations for the good job done so far with atlas control toolkit.

Going strict, i have this on my code:

<UpdatePanel>
<page stuf... grids, buttons, etc... />
<Panel (for modal popup)>
<textbox to receive result from popup />
<button to involke popup />
</Panel (for modal popup>
<Panel (for popup)>
<GridView with paging />
</Panel (for popup)>
<UpdatePanel
everything is working just perfectly, but when page changes and DataBind is involked page reloads and go out of modal mode.

Paging is working... if i browse into the textbox that involkes the popup, the grid inside is in new page.

I've browsed this forum for answers but haven't found so far...

Regards

Any ideas? cause i got none :)

Regards,

Felipe Oquendo
MCAD


I'll try to be more specific.

if i have a gridview inside a popup and this popup inside a modal popup, can i use paging for gridview? cause when i do it, the whole page reloads and modal state goes off...

Regards,

Felipe Oquendo
MCAD


I think it is because the elements inside the update panel is refreshing. I would try changing the position of the update panel like so:

<asp:panel id="modalpopup" runat="server">

<atlas:updatepanel id="p1" runat="server">

<your grid here>

<your paging controls here>

</atlas:updatepanel>

</asp:panel>

You have the update panel wrapping everything, including the popup panel, if I'm not mistaken. Only wrap what needs updating via postback (like the gridview and the buttons)

You can even break out your paging buttons into their own update panels and use trigger on the gridview update panel.


I just posted that i didn't have a solution in another thread but BANG! it worked...

I'll need to study the engine i guess... the development is not yet that transparent and the concepts are not well defined...

Wednesday, March 21, 2012

Parser Error Message: Type System.Web.UI.UpdatePanel does not have a public property named

Hi, first post...I am fairly new to ajax and was looking for some guidance on my problem. I installed the 3 files (Ajax 1.0 RC, Toolkit and the Futures December CTP). I wanted to convert an exsisting and working .net 2.0 sample aspx page into AJAX to learn how the updatepanels work. The page contains a bunch of datagrids that i wanted to place inside "updatepanels".

However, I keep getting the parser error"Type 'System.Web.UI.UpdatePanel' does not have a public property named 'datagrid'." whenever I placeanything inside the panels (table, div, tr...etc). I am sure its a pretty straight forward problem but not sure where to start looking.

If it matters, my solution in MS Visual Studio does not include a BIN folder. (something tells me i need it) I created a "New Website" and selected "AJAX-enabled website" and went from there. I could not find templates to start working from.

Thanks in advance!
Skimo!

<

asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager>

<asp:UpdatePanelID="UpdatePanel1"runat="server">

<

asp:datagridid="results"runat="server"GridLines="Horizontal"BorderWidth="2px"BorderColor="#f4f4f4"CellPadding="5"CellSpacing="0"AlternatingItemStyle-BackColor="#EAEAFF"ShowHeader="False"Width="100%"Autogeneratecolumns="False"AllowPaging="true"BorderStyle="Solid"PageSize="25"OnPageIndexChanged="results_Paging"><columns><asp:TemplateColumnItemStyle-Width="15%"><ItemTemplate>

<%

# DataBinder.Eval(Container.DataItem,"createdate") %></ItemTemplate></asp:TemplateColumn><asp:TemplateColumnItemStyle-Width="15%"><ItemTemplate>

<%

# DataBinder.Eval(Container.DataItem,"name") %></ItemTemplate></asp:TemplateColumn><asp:TemplateColumnItemStyle-Width="70%"><ItemTemplate>

<%

# DataBinder.Eval(Container.DataItem,"comment") %></ItemTemplate></asp:TemplateColumn>

</columns><PagerStyleMode="NumericPages"HorizontalAlign="Center"/>

</

asp:datagrid>

</

asp:UpdatePanel>

you cant load datagrid in the page.load when its inside of UpdatePanel.

This is because UpdatePanel gets call first before the grid gets load. Thats is why it couldnt find it.

you can have button inside of updatepanel, when you click the button the it will do databind with grid


It is indeed a straightforward problem. Everything inside an UpdatePanel goes inside a "ContentTemplate", like this:

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DataGrid ...>
</asp:DataGrid>
</ContentTemplate>
</asp:UpdatePanel>


Thank you so much!! I learned something :)

Does this mean I do not need to worry about the BIN folder not being there?

-Skimo


You won't need a bin folder to just use ASP.NET AJAX itself, since it gets installed globally for the machine.

If you use the AJAX Control Toolkit or the December Futures CTP, then your project will need to have the appropriate binaries in the bin folder.

I'm glad you're off and running... good luck exploring ASP.NET AJAX!


Great thanks for your help!

Skimo