Showing posts with label facing. Show all posts
Showing posts with label facing. Show all posts

Monday, March 26, 2012

UpdatePanel / DataGrid / Internet Explorer Lock up

Hi!

I'm facing a strange problem and would like to know if anybody can help me out!
I've a page with 5 UpdatePanels which all use the same asynchronous Postback Trigger (a DropDown Box).

e.g.

<asp:ScriptManagerID="_scriptManager"runat="server"EnablePartialRendering="true">

<Services>

<asp:ServiceReferencePath="../services/positions.asmx"/>

</Services>

</asp:ScriptManager>

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

<ContentTemplate>

<asp:GridViewBorderWidth="0"CellSpacing="0"cellpadding="3"Width="100%"ID="grdCash"runat="server"ForeColor="#333333"GridLines="Horizontal"AutoGenerateColumns="False"ShowFooter="False">

<FooterStyleBackColor="#5D7B9D"Font-Bold="True"ForeColor="White"/>

<RowStyleBackColor="#F7F6F3"ForeColor="#333333"/>

<EditRowStyleBackColor="#999999"/>

<SelectedRowStyleBackColor="#E2DED6"Font-Bold="True"ForeColor="#333333"/>

<PagerStyleBackColor="#284775"ForeColor="White"HorizontalAlign="Center"/>

<HeaderStyleBackColor="#5D7B9D"Font-Bold="True"ForeColor="White"/>

<AlternatingRowStyleBackColor="White"ForeColor="#284775"/>

<Columns>

<asp:BoundFieldItemStyle-Width="80"DataField="SEGMENT"HeaderText="SEGMENT/CCY"HeaderStyle-HorizontalAlign="center"ItemStyle-HorizontalAlign="center"/>

<asp:BoundFieldDataField="DATUM"HeaderText="DATUM"HtmlEncode="False"DataFormatString="{0:dd.MM.yyyy}"HeaderStyle-HorizontalAlign="center"ItemStyle-HorizontalAlign="center"/>

<asp:BoundFieldDataField="FREE_CASH"HeaderText="FREE CASH"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="left"ItemStyle-HorizontalAlign="left"/>

<asp:BoundFieldDataField="SETT_TRANS"HeaderText="SETT.TRANS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="CPNS"HeaderText="CPNS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="REDEMPTIONS"HeaderText="REDEMPTIONS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="CASH_TRANSFERS"HeaderText="TRANSFERS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="DEPOSITS"HeaderText="DEPOSITS"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:BoundFieldDataField="MAT_TD"HeaderText="MAT.TD"HtmlEncode="False"DataFormatString="{0:N}"HeaderStyle-HorizontalAlign="right"ItemStyle-HorizontalAlign="right"/>

<asp:TemplateFieldHeaderText="VALID"HeaderStyle-HorizontalAlign="center"ItemStyle-HorizontalAlign="center">

<ItemTemplate>

<asp:ImageID="imgValid"BorderStyle="None"runat="server"/>

</ItemTemplate>

</asp:TemplateField>

</Columns>

</asp:GridView>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTriggerControlID="drpFonds"/>

</Triggers>

</asp:UpdatePanel>


The strange thing is that after a couple of refreshes (through the async postback trigger drpFonds) the Internet Explorer ( on the client ) locks-up and CPU utilization goes up to 100%.
I use some javascript code on this page, but there aren't any loops or timers (like setinterval etc.)
The partial postback executes some SQL queries and updates the datagrid(s) - nothing else happens.
I can't figure out what's wrong. Can anybody give me some hints on how to debug such a problem?

Thank you!

Regards
Holger

I had a problem just like that. It turned out that I was using a

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(calledFunction)

without removing it using

Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(calledFunction)

Every time the update panel posted back it added another delegate call to the event. So over time the target function was being called over and over and over until it crashed the browser.

Saturday, March 24, 2012

updatepanel and cyrillic encoding problem

Hi!

I'm facing the next problem now:

All cyryllic characters (my site has 'windows-1251' codepage) within textboxes, that are located in updatepanel control turn into abracadabra like this - "Р?Р'Р'Р"Р" when I press any button inside update panel, which cause asynchronous postback. I have obviously defined codepage in web.config

<

globalizationfileEncoding="windows-1251"requestEncoding="windows-1251"responseEncoding="windows-1251"culture="ru-RU"uiCulture="ru-RU"/>

and in every page

<metahttp-equiv="Content-Type"content="text/html; charset=windows-1251"/>

and have no idea where else do I need to define it in order to prevent such transformations !

Look at http://www.guysmithferrier.com/ and in particular at Guy Smith's bookISBN 0321341384 this book was approved by the Microsoft Globalisation Team

Also his presentation http://www.guysmithferrier.com/downloads/teni18n.pdf


Can you point me exactly on the article or another source on this site because I'm not shure what to search. I'd appreciate it very much. Don't you make me to search through entire site! -(
Regrettably my copy of Guy's book is locked in my desk drawer back at client site so I will not will able to look it up until late on Tuesday.

Ok, I could wait. Thanks.

Don't you know is there an electronic version of this book?


Look at http://safari.oreilly.com/0321341384 - it is available online at Safari Books
Thanks a lot! Anyway, I'm still waiting you to point a chapter which illustrates my problem solving...

See chapter 5 of Guy's book.

You may need to make up a minimal form demonstrating the problem and post that.


TATWORTH:

See chapter 5 of Guy's book.

You may need to make up a minimal form demonstrating the problem and post that.

I think a book won't help in this situation because it seems that we simply faced an updatepanel bug here.

There is a newer thread about this (Encoding Problem with Ajax), it has a small and simple example also to reproduce the bug(?)