Thursday, April 23, 2015

ASP.NET UpdatePanel is not working in Google Chrome

I received a complaint from one of my user who said that the data grid not refreshing properly in Google Chrome.

Guess what..? I turned on the developer console in Chrome and found out that there is an error in loading some java script. After some research, I found the script below that fixed the problem:

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';
}