I am using ASP.NET 2 and I have included the System.Web.Extentions dll for ASP.NET AJAX.
I have a page where I have a nested repeater in an update panel triggered by the onselectedchange event of a drop down list. So when I change the drop down, the data that is displayed changes. Works in IE, and Firefox which would be expected. Also partially
works in Chrome and Safari. What happens is the data will change fine, but if there is a case where there is no data, it breaks. In Firefox and IE it will display a message instead as I do a check for number of items. In Chrome and Safari it will display the
message, but it will leave one of the old child repeater divs behind from the old bound data. If you click on the drop down it will disappear, (or inspect element on developer tools) but then it freezes the dropdown. I am aware that there is a *bug* with webkit
browsers and update panels so I included this js in my scriptmanager:
but it seems to make no difference. I have used Chrome developer tools and done some console logging and it runs this script. I have also stepped through my code to ensure that it isn't still binding any data. Anyone have any ideas?
I have found the answer though not in the quickest way. I rewrote the page so that I do AJAX via page methods and used Javascript to repeat the markup as required. This led me to discover that between each dropdown list change, clearing all child divs (the
div which appeared from the old bound data) before binding the data, stopped it reapearing. the drop down list freeze went away too without update panels. It not works in Chrome and Safari fine
Thanks for testing it out, the fact that it worked for someone helped me
Fliz
Member
35 Points
81 Posts
Update panel with nested repeater not working correctly in Chrome or Safari despite bug fix?
May 29, 2012 03:00 PM|LINK
Hello,
I am using ASP.NET 2 and I have included the System.Web.Extentions dll for ASP.NET AJAX.
I have a page where I have a nested repeater in an update panel triggered by the onselectedchange event of a drop down list. So when I change the drop down, the data that is displayed changes. Works in IE, and Firefox which would be expected. Also partially works in Chrome and Safari. What happens is the data will change fine, but if there is a case where there is no data, it breaks. In Firefox and IE it will display a message instead as I do a check for number of items. In Chrome and Safari it will display the message, but it will leave one of the old child repeater divs behind from the old bound data. If you click on the drop down it will disappear, (or inspect element on developer tools) but then it freezes the dropdown. I am aware that there is a *bug* with webkit browsers and update panels so I included this js in my scriptmanager:
if (typeof (Sys.Browser.WebKit) == "undefined") { Sys.Browser.WebKit = {}; } if (navigator.userAgent.indexOf("WebKit/") > -1) { Sys.Browser.agent = Sys.Browser.WebKit; Sys.Browser.version = parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]); Sys.Browser.name = "WebKit"; }but it seems to make no difference. I have used Chrome developer tools and done some console logging and it runs this script. I have also stepped through my code to ensure that it isn't still binding any data. Anyone have any ideas?
<asp:DropDownList ID="BookingDates" runat="server" AutoPostBack="true" CssClass="bookingDatesList" OnSelectedIndexChanged="BookingDates_SelectedIndexChanged" OnChange="hideSeminarDetails();"/> <asp:UpdatePanel ID="UpdateFeed" runat="server"> <ContentTemplate> <asp:Repeater ID="BookingDateList" runat="server" OnItemDataBound="BookingDateList_ItemDataBound" > <ItemTemplate> <div class="StartTimeBanner"><asp:Label ID="StartTimeBanner" runat="server" CssClass="StartTimeText"></asp:Label></div> <asp:Repeater ID="seminarFeed" runat="server" OnItemDataBound="SeminarFeed_ItemDataBound"> <ItemTemplate> <asp:LinkButton ID="SelectSeminar" runat="server" OnClientClick='<%# "UpdateSessionSeminar(" +Eval("Id") + " );" %>' > <div class="Seminar"> <asp:Label ID="FeedTitle" runat="server" cssClass="floatLeft FeedLabel"></asp:Label> <asp:Label ID="FeedTime" runat="server" cssClass="floatLeft FeedLabel"><%# Eval("StartTime") %> - <%# Eval("EndTime") %></asp:Label> </div> </asp:LinkButton> </ItemTemplate> </asp:Repeater> </ItemTemplate> </asp:Repeater> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="BookingDates" EventName="SelectedIndexChanged" /> </Triggers> </asp:UpdatePanel>Thanks
UpdatePanels 2.0 chrome Repeater safari
Song-Tian - ...
All-Star
43705 Points
4304 Posts
Microsoft
Re: Update panel with nested repeater not working correctly in Chrome or Safari despite bug fix?
May 30, 2012 08:55 AM|LINK
Hi,
I have try a scenario as you said. And that is runing normal. So please check again, or post more related code.
For updatepanel, please refer to: http://msdn.microsoft.com/en-us/library/bb386454.aspx.
Feedback to us
Develop and promote your apps in Windows Store
Fliz
Member
35 Points
81 Posts
Re: Update panel with nested repeater not working correctly in Chrome or Safari despite bug fix?
May 30, 2012 03:10 PM|LINK
hi,
I have found the answer though not in the quickest way. I rewrote the page so that I do AJAX via page methods and used Javascript to repeat the markup as required. This led me to discover that between each dropdown list change, clearing all child divs (the div which appeared from the old bound data) before binding the data, stopped it reapearing. the drop down list freeze went away too without update panels. It not works in Chrome and Safari fine
Thanks for testing it out, the fact that it worked for someone helped me