Web Parts in ASP.NET 3.5

I'm trying to create drag and drop web parts in ASP.NET 3.5, but the thing just doesn't want to be dragged along. I've already tried workarounds to make it Firefox compatible using AJAX but still doesn't work.

This is the 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 drop cursor when I find the titles. Any idea on what I might be doing wrong?

EDIT: I am on the page in edit mode, not in view mode ....

Tks in advance.

+2


source to share


1 answer


As a reference, I solved the problem by adding 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 is associated with a position element.

Hope this helps someone else facing the same problem.

+1


source







All Articles