My code sample is given below!

<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="SMS_Table.aspx.cs" Inherits="Web_sms_alert.SMS_Table" %>



  
      

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">

    </asp:ToolkitScriptManager>
    <asp:Label ID="Label1" runat="server"  Font-Bold="true" Text="From: "></asp:Label>
    <asp:TextBox ID="tbDatefrom" Font-Names="Segoe UI" runat="server"></asp:TextBox>

    <asp:CalendarExtender ID="CalendarExtender1" Format="yyyy-MM-dd" DefaultView="Days" TargetControlID="tbDatefrom" runat="server">

    </asp:CalendarExtender>

    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
        ControlToValidate="tbDatefrom" Font-Bold="true" ErrorMessage="*"></asp:RequiredFieldValidator>

    <asp:Label ID="Label2" runat="server"  Font-Bold="true" Text="To: "></asp:Label>
    <asp:TextBox ID="tbDateTo" Font-Names="Segoe UI" runat="server"></asp:TextBox>

    <asp:CalendarExtender ID="CalendarExtender2" Format="yyyy-MM-dd" DefaultView="Days" TargetControlID="tbDateTo" runat="server">

    </asp:CalendarExtender>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
        ControlToValidate="tbDateTo" Font-Bold="true" ErrorMessage="*"></asp:RequiredFieldValidator>
    <asp:Button runat="server" ID="btnSearch" CssClass="buttons" Text="Search" OnClick="btnSearchDW" /></br>
    <div style="float: left; width: 98%; height: 30px;"><asp:CheckBox ID="cbDateRange" runat="server" Font-Bold="true" Font-Names="Segoe UI" Text="Date Range" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:CheckBox ID="cbsmsday" Text="SMS/Day" Font-Bold="true" Font-Names="Segoe UI" runat="server" /></div>
   <asp:UpdatePanel ID="upl" runat="server">
   <ContentTemplate>

<asp:GridView ID="GridviewSMS_Table" runat="server"
           EnableSortingAndPagingCallbacks="false" AllowPaging="true" PageSize="20"
            BorderColor="Chocolate" BorderStyle="None" OnPageIndexChanging="GridView1_PageIndexChanging"
              BorderWidth="1px" CellPadding="3" GridLines="Vertical" Font-Names="Segoe UI" Width="354px">
        <RowStyle BackColor="Wheat" ForeColor="Black" HorizontalAlign="Left" />
        <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton ID="btnLinkView" runat="server" OnClick="btnLinkView_click">Text</asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" Font-Size="Medium" />
        <EditRowStyle BackColor="#000084" Font-Bold="True" ForeColor="White" Font-Size="Medium" />

    </asp:GridView>

<asp:Panel ID="PanelText" runat="server" CssClass="ModalPopup" style="display:none">
<table border="1" align="center" style="border-color: #FF6600">
    <tr>
        <td> <asp:Label ID="lblTextShow" ForeColor="Black" Text="Text Message: " runat="server"></asp:Label></td>
        <td><asp:TextBox ID="tbMessage" runat="server" TextMode="MultiLine" ForeColor="Black" Height="150px" Width="200px"></asp:TextBox></td>
    </tr>
    <tr align="center" valign="middle">
    <td colspan="2">
    <asp:Button ID="btnClose" runat="server" ForeColor="Black" Text="Close" />
    </td> </tr>
</table>
</asp:Panel>
<asp:Button ID="btncontrol" runat="server" style="display:none" />
<asp:ModalPopupExtender ID="mpeMessage" runat="server" Enabled="true"
  TargetControlID="btncontrol" PopupControlID="PanelText"
  BackgroundCssClass="ModalBackground" CancelControlID="btnClose">
</asp:ModalPopupExtender>
</ContentTemplate>
</asp:UpdatePanel>



<div align="center">
<asp:Label ID="lblTotalDp" Font-Bold="true" Visible="false" ForeColor="Black" runat="server" Text="Total: "></asp:Label>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="lbltotal" Font-Bold="true" Visible="false" ForeColor="Black" runat="server"></asp:Label></div>
 </div>




该页面显示在google chrome和IE中。


而在狐狸中,网格视图是主页的外部内容占位符!像下面


我不明白为什么我要面对这个问题???请帮助我。

最佳答案

<div style="float: left删除float:left

我看不出有什么原因,而浮动工具正在造成这个问题。

关于asp.net - Gridview在Firefox浏览器中超出内容占位符,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12836543/

10-08 23:12