I am using <asp:repeater> to display the items from a sharepoint list.
foreach (SPListItem curItem in curItems)
{
_itemUrl = curItem.Web.Url;
_listUrl = curItem.ParentList.Form[PAGETYPE.PAGE_DISPLAYFORM].Url;
_itemId = curItem.ID;
}
ASP.net repeater:
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<%# ((SPListItem)Container.DataItem)["Title"] %>
</ItemTemplate>
</asp:Repeater>
How can I display these properties:curItem.Web.Url, curItem.ParentList.Form[PAGETYPE.PAGE_DISPLAYFORM].Url in the repeater like I did for “Title” field?
Like this:
<%# ((SPListItem)Container.DataItem)["Title"] %>
Any idea how it can be done and what is the best way of doing it?
OR
If you cast the data container, you can directly use the object as such.