populate a html list control using .NET

前端 未结 4 689
暗喜
暗喜 2021-02-06 05:13

I have a list defined like so:

  • Item 1
4条回答
  •  隐瞒了意图╮
    2021-02-06 06:08

    The simplest way you can solve this problem is by using the asp repeater control

    • <%# Eval("Item") %>

    [Edit] - Do remember to set the datasource on repeaterMyList and call databind on the repeater control in the codebehind.

    repeaterMyList.DataSource = someDataTable;
    repeaterMyList.DataBind();
    

提交回复
热议问题