//Operation # 1 /// Basic operations get userName
var str = "Start";
var listA = Sitecore.Context.GetUserName();
// Result will be like extranet\Anonymous
//Operation # 2 /// Get all items
var list = Sitecore.Context.Database.Items["/sitecore/content/Jack/Our Team"];
foreach (Item subitem in list.Children)
{
str = str + subitem.Name;
}
testDiv.InnerText = Convert.ToString(str);
var str = "Start";
var listA = Sitecore.Context.GetUserName();
// Result will be like extranet\Anonymous
//Operation # 2 /// Get all items
var list = Sitecore.Context.Database.Items["/sitecore/content/Jack/Our Team"];
foreach (Item subitem in list.Children)
{
str = str + subitem.Name;
}
testDiv.InnerText = Convert.ToString(str);
No comments:
Post a Comment