R – Web Parts in ASP.NET 3.5

asp.net-3.5web-parts

I'm trying to create draggable web parts in ASP.NET 3.5 but the thing just doesn't want to be dragged. I already tried the workarounds for making it compatible with Firefox, by using AJAX, but still doesn't work.

This is code I have on my page:

<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>

I never get the drag cursor when I hover the titles.
Any idea on what I may be doing wrong?

EDIT:
I am in the page in Edit mode, not Browse mode….

Tks in advance.

Best Answer

As a reference, I solved the problem by adding a css to the div containing the web part controls:

<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>

It has to do with the position element.

Hope it helps someone facing the same problem.

Related Topic