GridView 能不能不生成表格

cxuyiwei 2008-07-14 08:05:17
我想用<DIV>显示数据,可别的控件好象没有分页功能,GridView要怎么改才能不显示<talbe><tr><td>这些
...全文
88 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
namhyuk 2008-07-16
  • 打赏
  • 举报
回复
也许可以用ControlAdapter来实现。

参考这个视频:Map an ASP.NET Server Control to the Adaptor Used to Render It

How to use a control adaptor to provide different renderings for an ASP.NET server control without actually changing the control itself. In this video, an ASP.NET BulletList control will be adapted to display each list item horizontally using <div> elements instead of the traditional <ul> elements. First, see how to create a class that inherits WebControlAdaptor and then implements the code to render the new list format. Next, learn how to map the new control adaptor to the ASP.NET server control in the .browser definition file. Then see how to use the new control adaptor on pages in a web site. Finally, learn how a control adaptor can be associated with either all browsers or specific types of browsers.
fellowcheng 2008-07-14
  • 打赏
  • 举报
回复
用Repeater吧
fellowcheng 2008-07-14
  • 打赏
  • 举报
回复
本来就是表格控件,总要嵌套到表格里

62,232

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧