tolppa
asked on
SP2010: How to get url to Announcements list item?
Hello. I am creating a simple Visual WebPart that reads data from announcements list. I can read announcement list with:
But ... How can I get an URL of actual announcement?
SPSiteDataQuery dataQuery = new SPSiteDataQuery();
dataQuery.Webs = "<Webs Scope=\"SiteCollection\">";
dataQuery.Lists = "<Lists ServerTemplate=\"104\" />";
dataQuery.ViewFields = string.Concat(
"<FieldRef Name=\"Modified\"/>", "<FieldRef Name=\"Title\"/>", "<FieldRef Name=\"Body\"/>");
dataQuery.Query = "<Where><IsNotNull><FieldRef Name=Title/>
</IsNotNull></Where>";
SPWeb w = site.OpenWeb();
//dtable = web.GetSiteData(dataQuery);
dtable = w.GetSiteData(dataQuery);
w.Dispose();
But ... How can I get an URL of actual announcement?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.