2009-08-19 52 views
2

我試圖在ASP.NET 3.5中創建可拖動的Web部件,但事情只是不想被拖動。我已經嘗試了通過使用AJAX使其與Firefox兼容的解決方法,但仍然無效。ASP.NET 3.5中的Web部件

這是代碼,我有我的網頁上:

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

我從來沒有得到過拖動光標,當我將鼠標懸停在標題。 關於我可能做錯什麼的想法?

編輯: 我在編輯模式的網頁,而不是事先瀏覽模式....

韓國社交協會。

回答

1

作爲參考,我通過添加一個CSS到含有幅部分控制在div解決了這個問題:

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

它具有與所述位置元件做。

希望它可以幫助面臨同樣問題的人。