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?
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