开发者

How to set <ItemTemplate> to a datasource?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜