View Single Post
  #5 (permalink)  
Old 11-14-2007, 01:55 AM
mobilegeek mobilegeek is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 205
mobilegeek is on a distinguished road
Smile Re: WebParts controls

Just tried to use iframes with webparts today and it works fine here, I can drag and drop webparts within iframe

here is my code snippet

webparts.aspx ----> where my webparts are created

Code:
<cc1:WebPartManager ID="WebPartManager1" runat="server"></cc1:WebPartManager>
             <table>
                <tr>
            
                    <td style="width: 100px; height: 100px;">
                         <cc1:WebPartZone ID="WebPartZone1" runat="server">
                            <ZoneTemplate>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </ZoneTemplate>
                            </cc1:WebPartZone>
                    </td>
                    <td style="width: 100px; height: 100px;">
                        <cc1:WebPartZone ID="WebPartZone2" runat="server">
                        </cc1:WebPartZone>
                    </td>
                    <td style="width: 100px; height: 100px;">
                        <cc1:WebPartZone ID="WebPartZone3" runat="server">
                        </cc1:WebPartZone>
                    </td>
                </tr>
            </table>
webparts.cs

Code:
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.WebPartManager1.DisplayMode = WebPartManager.DesignDisplayMode;
        }
    }
default.aspx ----> the page that contains the iframe and place my webparts inside the iframe

Code:
<form id="form1" runat="server">
    <iframe height="100%" src="webparts.aspx" width="100%">
        
    </iframe>
    </form>
Reply With Quote