如何将asp.net treeview控件转换为ul / li HTML元素?

时间:2014-11-09 12:55:47

标签: html asp.net treeview

在asp.net中,我有一个树视图控件,可以创建以下HTML元素:

<div id="MainContent_TreeView1">
    <table>
        <tr>
            <td><a id="MainContent_TreeView1n0" ></a></td><td ><a class="MainContent_TreeView1_0" id="MainContent_TreeView1t0">node1</a></td>
        </tr>
    </table><div id="MainContent_TreeView1n0Nodes" >
        <table>
            <tr>
                <td><div style="width:20px;height:1px"></div></td><td><a class="MainContent_TreeView1_0" >node1-1</a></td>
            </tr>
        </table>
    </div><table>
        <tr>
            <td><a id="MainContent_TreeView1n2"></a></td><td ><a class="MainContent_TreeView1_0" id="MainContent_TreeView1t2">node2</a></td>
        </tr>
    </table><div id="MainContent_TreeView1n2Nodes" >
        <table>
            <tr>
                <td><div style="width:20px;height:1px"></div></td><td></td><td ><a class="MainContent_TreeView1_0"  id="MainContent_TreeView1t3">node2-1</a></td>
            </tr>
        </table>
    </div><table>
        <tr>
            <td></td><td ><a class="MainContent_TreeView1_0"  id="MainContent_TreeView1t4">node3</a></td>
        </tr>
    </table>
</div>

但是,我需要它来生成ulli元素。我该怎么做?

0 个答案:

没有答案