开发者

How to set <ItemTemplate> to a datasource?

开发者 https://www.devze.com 2023-02-24 11:42 出处:网络
How can I set the datasource of an ItemTemplate? Right now I have one that is wrapped by a datarepeater and that is how I databind to it.

How can I set the datasource of an ItemTemplate? Right now I have one that is wrapped by a datarepeater and that is how I databind to it.

 <asp:Repeater ID="rptTotal" runat="server">
        <ItemTemplate>
            <tr>
                <td>One</td>
            <td>Two</td>
            <td>Three</td>
            <td>Four</td>
开发者_Python百科                </tr>
        </ItemTemplate>
</asp:Repeater>


You cant set the datasource for the item template, you can set it for the repeater in the code behind using

rptTotal.DataSource = datasourcename
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号