首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

asp.net2005设计视图与运作后的效果不一致?非常感谢大家呀

2012-09-08 
asp.net2005设计视图与运行后的效果不一致?非常感谢大家呀!如下html,在设计视图中版面都非常整齐,没有什么

asp.net2005设计视图与运行后的效果不一致?非常感谢大家呀!
如下html,在设计视图中版面都非常整齐,没有什么问题
我仔细分析了html,看不出来什么问题
但运行后就像一样是一个表格嵌套另一个表格样,感觉好怪哦!
最奇怪的是运行后,最下面还有一很大块空白区域,不知道从那里来的?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="IncomeToday.aspx.cs" Inherits="Finance_PaidToday" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
  <title>无标题页</title>
  <link href="../style/data_table.css" rel="stylesheet" type="text/css" />
  <link href="../themes/blue/style/style.css" rel="stylesheet" type="text/css" />
  <script src="../JS/Index.js" type="text/javascript"></script>
  <script src="../JS/calendar.js" type="text/javascript"></script>
</head>
<body>
  <form id="form1" runat="server">
  <div> 
<table class="com_table" style="width: 95%; height: 453px" >
<thead>
  <tr>
  <th colspan="7" style="height: 32px">今日收入</th>
  </tr>
  </thead>  
  <tbody>
  <tr>
  <th class="t_title" colspan="7">今日定单</th>
  </tr>
  <tr class="odd"><td colspan="7" style="text-align: left; height:auto; vertical-align:top">
  <weberp:Repeater ID="rpPlayer" runat="server" PageSize="5">
  <HeaderTemplate>
  <table class="com_table" >
  <thead>
  <tr>
  <th>订单号</th>
  <th>客户姓名</th>
  <th>套系(订金/余款)</th>
  <th>联系电话</th>
  <th>签单时间</th>
  <th>咨询顾问</th>
  </tr>
  </thead>
  </HeaderTemplate>
  <ItemTemplate>
  <tbody>
  <% i++;
  if (i % 2 == 1)
  {
  Response.Write(" <tr class='odd'>");
  }
  else
  {
  Response.Write(" <tr align='center'>"); 
  }  
  %> 
  <th class="two"><%#Eval("OrderFormID")%></th>  
  <td align="center"><%# Eval("ProductID")%>(<span class="dj"><%#Eval("Deposit")%></span>/<span class="red"><%#Eval("SpareMoney")%></span>)</td>
  <td align="center"><%#Eval("OrderTime", "{0:yyyy-MM-dd}")%></td>  


  </ItemTemplate></weberp:Repeater>
  </td>
  </tr>  
  <tr>
  <th class="t_title" colspan="7" style="height: 29px">今日补余</th>
  </tr>
  <tr class="odd">
  <td colspan="7" style="height:auto; text-align: left;vertical-align:top">
  <weberp:Repeater ID="rpRemain" runat="server" PageSize="5">
  <HeaderTemplate>
  <table class="com_table" >
  <thead>
  <tr>
  <th>订单号</th>
  <th>客户姓名</th>
  <th>套系(订金/余款)</th>
  <th>签单时间</th>
  <th>咨询顾问</th>
  </tr>
  </thead>
  </HeaderTemplate>
  <ItemTemplate>
  <tbody>
  <% i++;
  if (i % 2 == 1)
  {
  Response.Write(" <tr class='odd'>");
  }
  else
  {
  Response.Write(" <tr align='center'>"); 
  }  
  %>
  <th class="two"><%#Eval("OrderFormID")%></th>
  <td align="center">(<span class="dj"><%#Eval("BalanceMoney")%></span>/<span class="red"><%#Eval("PaySate")%></span>)</td>  
  <td align="center"><%#Eval("UpdateTime", "{0:yyyy-MM-dd}")%></td>  
  </tbody> 
  </ItemTemplate>
  </weberp:Repeater>
  </td>
  </tr>
  <tr>
  <th class="t_title" colspan="7" style="height: 29px">其它</th>
  </tr>
  <tr class="odd">
  <td style="width: 92px; text-align: center; height: 29px;">收入名称:</td>
  <td style="width: 90px; text-align: left; height: 29px;"><asp:TextBox ID="txtIncomeName" runat="server" Width="120px"></asp:TextBox></td>
  <td style="width: 70px; height: 29px;">时间:</td>
  <td colspan="2" style="text-align: left; width: 102px; height: 29px;" onBlur="IsValidDate(this.value)">
  <asp:TextBox ID="txtIncomeTime" runat="server" Width="112px" onfocus="setday(this)"></asp:TextBox></td>


  <td style="width: 109px">经手人:</td>
  <td style="width: 120px"><asp:TextBox ID="txtHandler" runat="server" Width="112px"></asp:TextBox></td>
  </tr>
  <tr class="odd">
  <td style="width: 92px; text-align: center;">具体内容:</td>
  <td colspan="7" style="text-align: left; width: 804px;">
  <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Width="550" Height="70"></asp:TextBox></td>
  </tr>
  <tr id="tr_Message" runat="server">
  <td colspan="7" align="center" style="height: 3px">
  <asp:Button ID="btnSumit" runat="server" Text="确定" CssClass="SS_submit" OnClientClick= "return checkInput();" OnClick="btnSumit_Click" />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <input type="reset" id="btnReset" class="SS_submit" value="重置" />
  </td>
  </tr>  
  </tbody>  
  </table>
  </div>
  </form>
</body>
</html>


[解决办法]
不要相信设计视图。自己手写html,然后运行在浏览器内看效果。

热点排行