我想用<DIV>显示数据,可别的控件好象没有分页功能,GridView要怎么改才能不显示<talbe><tr><td>这些

解决方案 »

  1.   

    也许可以用ControlAdapter来实现。参考这个视频:Map an ASP.NET Server Control to the Adaptor Used to Render ItHow 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.