很大可能是CSS写的有问题

解决方案 »

  1.   

    这个要看xxx.aspx和xxx.aspx.cs代码,你是怎样写的。
    更多技术支持:
    http://insus.cnblogs.com
      

  2.   

    数据绑定GridView控件自动更新数据设置
     <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
         
         <table>
                                    <tr>
                                        <td>
                                            <asp:GridView ID="gvDetail" runat="server" AutoGenerateColumns="False" 
                                                 
                                                DataMember="GoodsTypeID" EmptyDataText="暂无商品明细!" BackColor="#DEBA84" 
                                                BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                                                CellSpacing="2" AllowPaging="True" 
                                                onpageindexchanging="gvDetail_PageIndexChanging" PageSize="2" 
                                                style="font-size: small">
                                                <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                                                <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
           <Columns>//codego.net/tags/15/1/
                                                    <asp:BoundField DataField="GoodsName" HeaderText="商品名称" />
                                                    <asp:BoundField DataField="GoodsIntroduce" HeaderText="商品介绍" />
                                                    <asp:BoundField DataField="GoodsPrice" HeaderText="商品价格" />
                                                    <asp:TemplateField HeaderText="商品图像">
                                                        <ItemTemplate>
                                                             <asp:Image id="ProductImage" ImageUrl='<%# Eval( "GoodsPhoto") %>' runat="server"/>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="订购数量">
                                                        <ItemTemplate>
                                                              <asp:UpdatePanel ID="QuantityUpdatePanel" runat="server" UpdateMode="Conditional">
                                                <ContentTemplate>
                                                  <font size="1"><%=DateTime.Now.ToString("hh:mm:ss")%></font>
                                                                                <asp:Label ID="lblQuantity" Text="0" runat="server" />
                                                                                <asp:Button ID="DecreaseQuantity" Text="-" OnClick="DecreaseQuantity_Click" runat="server" />
                                                                                <asp:Button ID="IncreaseQuantity" Text="+" OnClick="IncreaseQuantity_Click" runat="server" />
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                                             
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                                                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                                                <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                                            </asp:GridView>
                                        </td>
                                        <td style="font-weight: 700">
                                         <asp:UpdatePanel ID="SummaryUpdatePanel" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <asp:Button ID="btnGetSummary" runat="server" 
                                                CommandArgument='<%# Eval("GoodsTypeName") %>' CommandName="ShowSummary" 
                                                Text="显示订货数量" onclick="btnGetSummary_Click" />
                                            <br />
                                            <asp:Label ID="lblSummary" runat="server" BackColor="#FFFFC0" 
                                                BorderStyle="Outset" Width="224px"></asp:Label> 
                                </ContentTemplate>
                            </asp:UpdatePanel>  
                                        </td>
                                    </tr>
                                </table>
        </div>
    //绑定控件显示数据信息
    protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.gvDetail.DataSource = GetDetailGoods();
                this.gvDetail.DataKeyNames = new string[] { "GoodsTypeID" };
                this.gvDetail.DataBind();
            }   
        }
    //获取明细表中数据    private DataTable GetDetailGoods()  
      {
            string strsql = "select * from tb_GoodsInfo1 ";
            return GetDataBySql(strsql);
        }
    //根据传递的SQL语句将查询表存储到内存表中
        private DataTable GetDataBySql(string strSql)  
      {
            string strCon = ConfigurationManager.AppSettings["conStr"];
            SqlConnection conn=new SqlConnection(strCon);//创建数据连接对象
            SqlDataAdapter da = new SqlDataAdapter(strSql, conn);//创建数据适配器
            DataTable dt = new DataTable();//创建内存表
            da.Fill(dt);//填充内存表
            return dt;
        }//其他(略)
      

  3.   

    有可能是两个问题:
    1.CSS语句不严密。
    2.该清缓存了亲。
      

  4.   

    可以试试在page_load里写page.databind();  看看行不行
      

  5.   

    如果是css'缓存问题,所有的数据都会有样式异常。建议用chrome浏览器,右键查看元素,看新加入的数据的样式和原有数据是否一致。IE调试模式下也可以查看,不过没那么强大。