using (SPWeb oWebsiteRoot = SPContext.Current.Site.RootWeb)
{
SPList oList = oWebsiteRoot.Lists["Tasks"];
SPQuery oQuery = new SPQuery();
oQuery.Query = "
"
SPListItemCollection collListItems = oList.GetItems(oQuery);
foreach (SPListItem oListItem in collListItems)
{
Response.Write(SPEncode.HtmlEncode(oListItem["Title"].ToString()) +
"
");
}
}
Source : Perdu
Aucun commentaire:
Enregistrer un commentaire