ASP面板在html表中? [英] ASP Panel around 's in html table?

查看:73
本文介绍了ASP面板在html表中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在asp面板中只放一个html表中的一列。

例如...



 <   table     border   =  1     bordercolor   = < span class =code-keyword>#FFCC00    style   =  background-color:#FFFFCC    width   =  100%    cellpadding   =  3    cellspacing   =  3 >  
< span class =code-keyword><
tr >
< asp:Panel ID = Panel 1 runat = 服务器 >
< td > 表格单元格< / td >
< / asp:Panel >
< td > 表格单元格< / td >
< td > 表格单元格< / td >
< td > 表格单元格< / td >
< / tr >
< tr >
< asp:Panel ID = Panel 1 runat = server >
< td > 表格单元格< / td >
< < span class =code-leadattribute> / asp:Panel >
< td > 表格单元格< / td >
< td > 表格单元格< / td >
< ; td > 表格单元格< / td >
< / tr >
< tr >





我觉得这可能很简单,但我似乎无法得到它。

解决方案

< blockquote> HTML < tr> 元素的子元素应该是一个或多个< th> 元素或匹配< td> 元素的数量。从< asp:Panel> 呈现的HTML元素实际上是< div> 。它不能用作raw的子节点,如果你想保留表格结构有3列,你显然是通过你的标记尝试。当然,您可以将 Panel 以及任何其他内容作为每个< th> 的内部HTML或< td> ,但为什么?



从这个问题来看,使用<$ c的目标$ c> Panel 目前尚不清楚。如果你能解释你想要达到的目的,你可以有机会获得一些替代方案的建议。



-SA


你必须在tablecell元素中放置一个panel或div元素,这个例子是合法的。



这使得一个表格在面板650px宽度,2列宽度相等325px,内置CSS。

< div> 
< table cellpadding =0cellspacing ==style =width:650px;>
< tr>
< td style =width:325px; height:100px; text-align:right>
< div style =width:325px;>< / div>
< / td>
< td style =width:325px; height:100px; text-align:left;>
< div style =width:325px;>< / div>
< / td>
< / tr>
< / table>
< / div>


I would like to know how I can put only 1 column from an html table inside of a asp panel.
for Example...

<table border="1" bordercolor="#FFCC00" style="background-color:#FFFFCC" width="100%" cellpadding="3" cellspacing="3">
	<tr>
             <asp:Panel ID="Panel 1" runat="server">
		<td>Table Cell</td>
               </asp:Panel>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
	</tr>
	<tr>
                <asp:Panel ID="Panel 1" runat="server">
		<td>Table Cell</td>
                 </asp:Panel>
		<td>Table Cell</td>
		<td>Table Cell</td>
		<td>Table Cell</td>
	</tr>
	<tr>



I feel that this is probably something simple but i just can''t seem to get it.

解决方案

The children of HTML <tr> element should be either one or more <th> elements or matching number of <td> elements. The HTML element rendered from <asp:Panel> is actually <div>. It cannot be used as a child of the raw, if you want to preserve table structure with 3 columns you apparently trying by your markup. Of course, you can have Panel, as well as any other content, as inner HTML of each <th> or <td>, but why?

From this question, the goal of using the Panel is not clear. If you can explain what exactly you want to achieve, you can get a chance for an advice for some alternative.

—SA


You have to put a panel or div element inside the tablecell element, this example is legal.

This makes a table inside a panel 650px width, with 2 columns of equal width 325px each with built-in CSS.

<div>
<table cellpadding="0" cellspacing="=" style="width: 650px;">
<tr>
  <td style="width: 325px; height: 100px; text-align: right">
    <div style="width: 325px;"></div>
  </td>
  <td style="width: 325px; height: 100px; text-align: left;">
   <div style="width: 325px;"></div>
  </td>
</tr>
</table>
</div>


这篇关于ASP面板在html表中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆