【问题标题】:Web Parts in ASP.NET 3.5ASP.NET 3.5 中的 Web 部件
【发布时间】:2009-08-20 18:43:00
【问题描述】:

我正在尝试在 ASP.NET 3.5 中创建可拖动的 Web 部件,但它不想被拖动。我已经尝试了通过使用 AJAX 使其与 Firefox 兼容的变通方法,但仍然不起作用。

这是我页面上的代码:

<asp:WebPartManager ID="WebPartManager1" runat="server">
    </asp:WebPartManager>
    <uc2:DisplayModeMenu ID="DisplayModeMenu1" runat="server" />
    <div>
        <table>
            <tr>
                <td>
                    <asp:WebPartZone ID="SidebarZone" runat="server" HeaderText="Sidebar">
                        <ZoneTemplate>
                            <asp:Label runat="server" ID="linksPart" title="My Links">
                              <a href="http://www.asp.net">ASP.NET site</a> 
                              <br />
                              <a href="http://www.gotdotnet.com">GotDotNet</a> 
                              <br />
                              <a href="http://www.contoso.com">Contoso.com</a> 
                              <br />
                            </asp:Label>
                            <uc1:SearchUserControl ID="SearchUserControl1" runat="server" title="Search" />
                        </ZoneTemplate>
                    </asp:WebPartZone>
                </td>
                <td>
                    <asp:WebPartZone ID="MainZone" runat="server" HeaderText="Main">
                        <ZoneTemplate>
                            <asp:Label ID="lbl" Text="Some text" Title="Content" runat="server"></asp:Label>
                        </ZoneTemplate>
                    </asp:WebPartZone>
                </td>
                <td>
                    <asp:EditorZone ID="EditorZone1" runat="server">
                        <ZoneTemplate>
                            <asp:AppearanceEditorPart ID="AppearanceEditorPart1" runat="server" />
                            <asp:LayoutEditorPart ID="LayoutEditorPart1" runat="server" />
                        </ZoneTemplate>
                    </asp:EditorZone>
                </td>
            </tr>
        </table>
    </div>

当我悬停标题时,我从来没有得到拖动光标。 知道我可能做错了什么吗?

编辑: 我在编辑模式下的页面,而不是浏览模式....

Tks 提前。

【问题讨论】:

    标签: asp.net-3.5 web-parts


    【解决方案1】:

    作为参考,我通过向包含 Web 部件控件的 div 添加一个 css 解决了这个问题:

    <style type="text/css">
        .container
        {
            padding: 0px;
            margin-top: 5px;
            margin-left: 20px;
            margin-bottom: 0px;
            /* position: relative;  */
            font-family: Arial, Helvetica, sans-serif;
            font-size: 12px;
            color: #333333;
            height: 550px;
            width: 990px;
        }
    </style>
    

    它与位置元素有关。

    希望它能帮助遇到同样问题的人。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-01-15
      • 1970-01-01
      • 1970-01-01
      • 2010-11-24
      • 2012-03-02
      • 1970-01-01
      • 2011-02-15
      相关资源
      最近更新 更多