ASP.NET,TabContainers和iFrame

时间:2011-07-15 15:10:57

标签: asp.net internet-explorer controls tabcontainer

我有一个带有iFrame的aspx页面。我动态地将iFrame的源代码设置为另一个aspx页面,除了一个Label和一个带有几个控件(文本框)的TabContainer之外,它只有3个选项卡。

当我在我的开发框(F5)上查看该网站时,一切都很好。我没有抱怨。

问题在于我发布网站并尝试查看它(任何浏览器)。 aspx页面加载到iFrame中 - 但是当我单击第二个选项卡时,我的所有控件都丢失了。当我点击第3个标签时,那些控件就在那里,但标签本身就消失了!所以我的用户被卡住了,无法完成他/她的工作。

有什么想法可能会发生什么?

谢谢,

杰森

PS - 代码以防万一:

        

<table width="100%" cellpadding=0 cellspacing=0 border=0><tr><td class="style5"><asp:Label ID="lblPolicyHolder" runat="server" Text="lblPolicyHolder"></asp:Label></td></tr></table>

<asp:TabContainer ID="InputContainer" runat="server" ActiveTabIndex="0">
    <asp:TabPanel runat="server" HeaderText="Input" ID="Input">
        <ContentTemplate>

        <table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0>

            <tr><td class="style4"><br /><br /><br />Date:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
                <td class="style3"><br /><br /><br /><asp:TextBox ID="txtDate" name="txtDate" runat="server"></asp:TextBox><asp:CompareValidator
                        ID="txtDateValidator" ValidationGroup="DateGroup" ControlToValidate="txtDate" runat="server" Operator="DataTypeCheck" Type="Date" ErrorMessage="Please enter a valid date."></asp:CompareValidator>
                                <asp:CalendarExtender CssClass="cal_Theme1" ID="CalendarExtender1" runat="server" PopupButtonID="txtDate" TargetControlID="txtDate"></asp:CalendarExtender></td></tr>

            <tr><td class="style4">&#160;</td>
                <td class="style3">&#160;</td></tr>

            <tr><td class="style4">Reasons:&#160;&#160;&#160;&#160;&#160; </td>
                <td class="style3"><asp:ListBox ID="lstReasons" runat="server" Width="380px" SelectionMode="Multiple"></asp:ListBox></td></tr>

            <tr><td class="style4">&#160;</td>
                <td class="style3"><div align=right><br /><asp:LinkButton ID="SendToBatch" runat="server" BackColor="#20548E" 
                 BorderColor="#20548E" ValidationGroup="DateGroup" BorderStyle="Solid" Font-Names="Tahoma" Font-Size="Small" 
                 Font-Underline="False" ForeColor="White" Height="16px" Width="85px"><center>Send To Batch</center></asp:LinkButton>&#160;&#160;&#160;&#160;&#160;&#160;</div></td></tr>

        </table>


        <!--Bottom Spacing-->
        <br />
        <br />
        <br />
        <br />

        </ContentTemplate>
    </asp:TabPanel>
    <asp:TabPanel runat="server" HeaderText="Header" ID="Header">
        <ContentTemplate>

        <table margin=0 width="100%" cellpadding=0 cellspacing=0>
            <tr><td class="style2"><br /><br />Date:&#160;&#160;&#160;&#160;&#160;&#160; </td>

                <td><br /><br /><asp:TextBox ID="txtHeaderDate" runat="server" Width="178px"></asp:TextBox>
                                <asp:CalendarExtender CssClass="cal_Theme1" ID="txtHeaderDateCalendarExtender2"
                                        runat="server" PopupButtonID="txtHeaderDateCalendarExtender2" TargetControlID="txtHeaderDate"></asp:CalendarExtender>
                    <br /></td></tr><tr><td class="style2">*&#160;Due Date:&#160;&#160;&#160;&#160;&#160;&#160; </td>
                    <td class="style1"><asp:TextBox ID="txtHeaderDueDate" runat="server" Width="178px"></asp:TextBox>
                                        <asp:CalendarExtender CssClass="cal_Theme1" ID="txtHeaderDueDateCalendarExtender2"
                                        runat="server" PopupButtonID="txtHeaderDueDateCalendarExtender2" TargetControlID="txtHeaderDueDate"></asp:CalendarExtender></td></tr>

             <tr><td class="style2">Addressee:&#160;&#160;&#160;&#160;&#160;&#160; </td>
                    <td><asp:TextBox ID="txtHeaderAddressee" runat="server" Width="178px"></asp:TextBox></td></tr>

             <tr><td class="style2">Street Address:&#160;&#160;&#160;&#160;&#160;&#160; </td>

                 <td><div align=right style="text-align: left">
                     <asp:TextBox ID="txtHeaderStreetAddress" runat="server" Width="178px"></asp:TextBox><br /></div></td></tr>

             <tr><td class="style2">&#160;</td>
                     <td><asp:TextBox ID="txtHeaderStreetAddress2" runat="server" Width="178px"></asp:TextBox></td></tr>

             <tr><td class="style2">City:&#160;&#160;&#160;&#160;&#160;&#160; </td>
                     <td><asp:TextBox ID="txtHeaderCity" runat="server" Width="178px"></asp:TextBox></td></tr>

             <tr><td class="style2">State:&#160;&#160;&#160;&#160;&#160;&#160; </td>

                 <td><asp:TextBox ID="txtHeaderState" runat="server" Width="28px">
                     </asp:TextBox>&#160;&#160;&#160;&#160;&#160; Zip:&#160;&#160;&#160;<asp:TextBox ID="txtHeaderZip" runat="server" Width="73px"></asp:TextBox></td></tr>

             <tr><td class="style2">&#160;</td><td>&nbsp;</td></tr>

             <tr><td class="style2">Company:&#160;&#160;&#160;&#160;&#160;&#160;</td>
                 <td><asp:TextBox ID="txtHeaderCompany" runat="server" Width="178px"></asp:TextBox></td></tr>

             <tr><td class="style2">&#160;</td><td>&nbsp;</td></tr>

             <tr><td class="style2"><font size="1">* if applicable to letter</font>&#160;&#160;&#160;&#160;&#160;&#160;</td><td style="text-align: right">&#160;</td></tr>
          </table>

        </ContentTemplate>
    </asp:TabPanel>
    <asp:TabPanel runat="server" HeaderText="Footer" ID="Footer">
        <ContentTemplate>

            <table margin=0 width="100%" cellpadding=0 cellspacing=0>

            <tr><td class="style2"><br /><br />User Number:&#160;&#160;&#160;&#160;&#160;&#160; </td>
                    <td><br /><br /><asp:TextBox ID="txtUserNo" runat="server" Width="178px"></asp:TextBox></td>

             </tr><tr><td class="style2">&#160;User Name:&#160;&#160;&#160;&#160;&#160;&#160; </td>
                    <td><asp:TextBox ID="txtUserName" runat="server" Width="178px"></asp:TextBox></td></tr>

             </tr><tr><td class="style2">&#160;Batch Number:&#160;&#160;&#160;&#160;&#160;&#160; </td>
                    <td><asp:TextBox ID="txtBatchNo" runat="server" Width="178px"></asp:TextBox></td></tr>

             <tr><td class="style2">&#160;</td>
                    <td>&#160;</td></tr>

             <tr><td class="style2">* Salutation:&#160;&#160;&#160;&#160;&#160;&#160; </td>

                 <td><div align=right style="text-align: left">
                     <asp:TextBox ID="txtSalutation" runat="server" Width="178px"></asp:TextBox><br /></div></td></tr>

             <tr><td class="style2">Department:&#160;&#160;&#160;&#160;&#160;&#160;</td>
                     <td><asp:TextBox ID="txtDepartment" runat="server" Width="178px"></asp:TextBox></td></tr>

             <tr><td class="style2">&#160; </td>
                     <td>&#160;</td></tr>

             <tr><td class="style2">&#160; </td>
                     <td>&#160;</td></tr>

             <tr><td class="style2">&#160;</td>
                     <td>&nbsp;</td></tr>

             <tr><td class="style2">&#160;</td>
                 <td>&#160;</td></tr>

             <!--<tr><td class="style2">&#160;</td>
                 <td>&nbsp;</td></tr>-->

             <tr><td class="style2"><font size="1">* defaults to 'Sincerely,'</font>&#160;&#160;&#160;&#160;&#160;&#160;</td><td style="text-align: right">&#160;</td></tr>
          </table>


        </ContentTemplate>
    </asp:TabPanel>

1 个答案:

答案 0 :(得分:0)

我最终将标签的名称从“输入”,“标题”,“页脚”更改为不同的名称,并且工作正常。