亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

利用majicAjax實現webParts無刷新拖動

標簽:
Html/CSS JQuery

webParts与UpdatePanel都是ms的产品,直接将webparts放在updatePanel里,原以为就可以搞定webparts无刷新拖动了,试验了一下:令人大跌眼镜,居然没反应,看来ms各产品之间的兼容性还有待改进

到网上搜索了一下,发现一个第三方的ajax工具:majicajax可以搞定这一问题。

这里转贴一个网友对此问题的文章:

Web.config的配置如下:

<?xmlversion="1.0"?>
<configuration>
     <configSections>
          <sectionname="magicAjax"type="MagicAjax.Configuration.MagicAjaxSectionHandler, MagicAjax"/>
     </configSections>
     <magicAjaxtracing="false">
          <pageStore/>
     </magicAjax>
     <system.web>
          <authenticationmode="Forms"/>
          <pages>
              <controls>
                   <addnamespace="MagicAjax.UI.Controls"assembly="MagicAjax"tagPrefix="ajax"/>
              </controls>
          </pages>
<webParts>
              <personalizationdefaultProvider="Nsquared2SqlPersonalizationProvider">
                   <authorization>
                       <allowusers="*"verbs="enterSharedScope"/>
                   </authorization>
                   <providers>
                       <addname="Nsquared2SqlPersonalizationProvider"type="Nsquared2.Web.UI.WebControls.WebParts.SqlPersonalizationProvider, Nsquared2.Web"connectionStringName="PortalConnectionString"varyByParams="ParentDPID,DPID,UserId"></add>
                   </providers>
              </personalization>
          </webParts>          <httpModules>
              <addname="MagicAjaxModule"type="MagicAjax.MagicAjaxModule, MagicAjax"/>
          </httpModules>
          <compilationdebug="true">
              <assemblies>
                   <addassembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
     </system.web>
</configuration>

 

使用WebPart的页面如下:

<asp:WebPartManager ID="WebPartManager1" runat="server">
            </asp:WebPartManager>
            <ajax:AjaxPanel ID="AjaxPanel1" runat="server" Height="305px" Width="452px">
            <wmz:WebPartDisplayModesMenu ID="WebPartDisplayModesMenu1" runat="server" />
            <table >
                <tr>
                    <td>
                        <asp:WebPartZone ID="WebPartZone1" runat="server">
                            <ZoneTemplate>
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </ZoneTemplate>
                        </asp:WebPartZone>
                    </td>
                    <td >
                        <asp:WebPartZone ID="WebPartZone2" runat="server">
                            <ZoneTemplate>
                                <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
                            </ZoneTemplate>
                        </asp:WebPartZone>
                    </td>
                </tr>
            </table>
        </ajax:AjaxPanel>


把两个WebPartZone放在 MagicAjax's AjaxPanel.控件中,可以支持所有的WebPart的所有操作无刷新,类似于Google的Loading……效果。

點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消