asp.net 的奇怪问题... tabpanel/Gridview 移出表格区域
我的项目面临一个奇怪的问题...当页面渲染时,我的 tabpanel/gridview 移出了表格区域。简而言之:我已经在表格内声明了一个选项卡面板,例如
<table id="table1" border="1" runat="server" width="100%">
<tr><td>
<cc1:tabcontainer .....>
<cc1: tabpanel .......>
<gridview .............>
</gridview>
</cc1:tabpanel>
</cc1:tabcontainer>
</td></tr>
<table>
当页面呈现时...我的选项卡面板显示超出表格区域...意味着它一半在表格内,一半在表格外。
我认为问题可能出在 tabpanel 上...我删除了面板并将 GridView 保留在表格内,如下所示
<table id="table1" border="1" runat="server" width="100%">
<tr><td>
<gridview .............>
</gridview>
</td></tr>
<table>
但我仍然面临同样的问题。 Gridview 渲染正在移出表格宽度。我尝试更改表格宽度和 Gridview 宽度,但没有成功。
这甚至不是 CSS 设计的问题...因为其他页面中的 Gridview 工作正常。
请帮我解决这个问题。
I am facing a strange issue with my project ... when page is rendering my tabpanel/gridview is moving out of table area. To brief: I have declared a tabpanel inside table like
<table id="table1" border="1" runat="server" width="100%">
<tr><td>
<cc1:tabcontainer .....>
<cc1: tabpanel .......>
<gridview .............>
</gridview>
</cc1:tabpanel>
</cc1:tabcontainer>
</td></tr>
<table>
When page renders ... my tabpanel display going out of table area ... means it's half inside table and half outside table.
I thought maybe the problem is with tabpanel ... I removed the panel and just kept GridView inside table like below
<table id="table1" border="1" runat="server" width="100%">
<tr><td>
<gridview .............>
</gridview>
</td></tr>
<table>
But still I am facing the same issue. Gridview rendering is moving out of the table width. I tried changing the table width and Gridview width but no luck.
It's even not the problem with CSS design ... cause Gridview in other pages are working fine.
Please help me to solve this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很可能是渲染控件 html 代码中 div 的 CSS 问题。
顺便说一句,代码看起来有点像 html 表格的“布局滥用”——确定仅用 CSS 无法实现相同的效果吗?
但是,如果您想保留该表并解决问题,请尝试以下操作:
It's most likely a CSS issue with a div in the rendered control html code.
BTW, the code looks a bit like a "use for layout abuse" of an html table - sure you can't achieve the same with just CSS?
However, if you want to keep the table and solve the issue, try the following: