Sharepoint 2010, update panel在chrome裏不能postback的問題

Sharepoint 2010, update panel在chrome裏不能postback的問題, 可以用此方法解決:


When you are using Update panel in asp.net..You will find problem that it is not working in google chrome and safari

So for this you have to just following steps..

Step 1 :
You need to add a little bit of javascript in to aid the Ajax.NET framework in recognising WebKit based browsers that looks like the following:

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


?
Step 2 :
You need to add that to a javascript file and reference it in your ScriptManager:


<asp:scriptmanager id="ScriptManager1"runat="server">
    <scripts>
        <asp:scriptreference path="~/javascript/WebKit.js">
    </asp:scriptreference></scripts>
</asp:scriptmanager>


?
That's it.Now Updatepanel will work in Google Chrome and all other browsers..

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值