zoukankan      html  css  js  c++  java
  • 利用majicAjax实现webParts无刷新拖动

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

    到网上搜索了一下,发现一个第三方的ajax工具:majicajax可以搞定这一问题(官方网站:www.majicajax.net)

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

    介绍MagicAjax
    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 style=" 505px">
                    <tr>
                        <td>
                            <asp:WebPartZone ID="WebPartZone1" runat="server">
                                <ZoneTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                </ZoneTemplate>
                            </asp:WebPartZone>
                        </td>
                        <td style=" 280px">
                            <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的所有操作无刷新,类似于GoogleLoading……效果。具体的例子参看MagicAjax's提供的例子。例子中包含了一个使用WebPart的例子。

    参看在线演示http://demo2.magicajax.net/examples/WebParts.aspx

    http://www.cnblogs.com/shanyou/archive/2006/01/19/320192.html

    http://www.magicajax.net/

    http://demo2.magicajax.net/examples/WebParts.aspx

    作者:菩提树下的杨过
    出处:http://yjmyzz.cnblogs.com
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    第3章 管道符、重定向与环境变量
    基于Linux命令行KVM虚拟机的安装配置与基本使用
    Linux系统真正的优势以及学习方法
    一款在线编写接口文档的工具
    springboot前端传参date类型后台处理方式
    软件工程专业需要知道的缩写和专业名词
    七牛云图床及MPIC工具使用
    阿里云ECS云服务器CentOS部署个人网站
    【字】biang
    【车】打开车窗技巧
  • 原文地址:https://www.cnblogs.com/yjmyzz/p/1060857.html
Copyright © 2011-2022 走看看