を実行した後から来たサブサイトを取得する:私はquery.ViewFields += "<FieldRef Name='FileRef' Nullable='TRUE' />";
を使用する場合、私はあることを理解し、私はアイテムがどこから来たというサブサイトを取得したいと思い、私の結果で私は次のコード持っているアイテムはspsitedataquery
SPSiteDataQuery query = new SPSiteDataQuery();
//Get List query string
query.Lists = "<Lists BaseType='1'></Lists>";
query.ViewFields = "<FieldRef Name='Title' Nullable='TRUE' />";
query.ViewFields += "<FieldRef Name='ContentTypeId' Nullable='TRUE' />";
query.ViewFields += "<FieldRef Name='ContentType' Nullable='TRUE' />";
query.ViewFields += "<FieldRef Name='ArticleStartDate' Nullable='TRUE' />";
query.ViewFields += "<FieldRef Name='Synopsis' Nullable='TRUE' />";
query.ViewFields += "<FieldRef Name='PublishingRollupImage' Nullable='TRUE' />";
query.ViewFields += "<FieldRef Name='Location' Nullable='TRUE' />";
query.ViewFields += "<FieldRef Name='LOBGroup' Nullable='TRUE' />";
query.Query = "<Where>" +
"<Contains>" +
"<FieldRef Name='ContentType'/>" +
"<Value Type='Text'>DCP_Article</Value>" +
"</Contains>" +
"</Where>";
query.Query += "<OrderBy>" +
"<FieldRef Name='ArticleStartDate' Descending='TRUE' />" +
"</OrderBy>";
query.RowLimit = Convert.ToUInt32(loadsize);
query.Webs = "<Webs Scope='Recursive' />";
//Get Site Data from web
DataTable dt = web.GetSiteData(query);
をアイテムの完全なURLを取得できますが、とにかくそこから来たサブサイトを取得できますか?このような何か: query.ViewFields += "<FieldRef Name='SiteName' Nullable='TRUE' />";