自定义控件ASP.Net-LI控件内部具有链接的无序列表

问题描述

|| 我需要创建一个自定义控件,该控件吐出以下html:
<ul>
    <li>
        <a href=\"test.html\">link button</a>
    </li>
    <li>
        <a href=\"test.html\">link button</a>
    </li>
</ul>
我需要链接是LinkBut​​tons并在li元素内输出。 建立此控件的最佳方法是什么?     

解决方法

您可以使用内置的DataBound控件(如ListView或Repeater控件)来做到这一点。 您可以在li标签中添加LinkBut​​ton。 其他资源: http://www.asp.net/aspnet-35/videos/the-listview-control