Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 如何在html表中放置gridview_.net_Asp.net_Html_Gridview - Fatal编程技术网

.net 如何在html表中放置gridview

.net 如何在html表中放置gridview,.net,asp.net,html,gridview,.net,Asp.net,Html,Gridview,我在做类似的事情 <table> <tr> <td width="15%" height="50"> Some content </td> <td width="25%" height="50"> My dropdown 1 </td> <td colspan="2" rowspan="3"> <asp:gridview id="mygrid-1" runat="server

我在做类似的事情

<table>
<tr>
   <td width="15%" height="50"> Some content </td>
   <td width="25%" height="50"> My dropdown 1 </td>
   <td colspan="2" rowspan="3">
       <asp:gridview id="mygrid-1" runat="server">....<asp:gridview>
       <br>
     <asp:gridview id="mygrid-2" runat="server">....<asp:gridview>
   </td>
<tr>
<tr>
    <td width="15%" height="50"> Some content </td>
     <td width="25%" height="50"> My dropdown 2 </td>
</tr>
<tr>
    <td colspan="2" height="*">  </td>
</table>

一些内容
我的下拉列表1
....

.... 一些内容 我的下拉列表2

在我的下拉列表Selexted index change中,两个网格都被填充,但这完全忽略了我分配给前两个表行的高度,我希望前两行的高度与50相同,在网格数据填充中,我希望表的第三行的高度增加,但是如果没有看到更多,我就说不出真正的问题是什么。在这里查看代码时,首先想到的是宽度/高度属性实际上应该在CSS中完成,而不是在html中完成。然后,对这些行使用CSS,您可以使用
空白:nowrap取决于该内容是什么

从这里看,我不是很肯定,但似乎您可能正在使用您的表格进行布局。切换到使用CSS进行布局,并将这些行转换为
s,这样您就可以以更加优雅和语义化的方式使用gridview