也许可以用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.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货