//fetching web local regional setting
Thread.CurrentThread.CurrentCulture = SPContext.Current.Web.Locale;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite ElevatedSite = new SPSite(SPContext.Current.Site.ID))
{
using (SPWeb ElevatedWeb = ElevatedSite.OpenWeb(SPContext.Current.Web.ID))
{
SPFile ospFile = ElevatedWeb.GetFile(Page.Request.Url.ToString());
if (ospFile.Exists && DateTime.Compare(ospFile.TimeLastModified, ElevatedWeb.Created) > 0)
lastUpdated = ospFile.TimeLastModified.ToShortDateString();
else
lastUpdated = ElevatedWeb.Created.ToShortDateString();
}
}
});
Friday, June 5, 2009
Subscribe to:
Post Comments (Atom)
Thanks in support of sharing such a pleasant thought,
ReplyDeletearticle is pleasant, thats why i have read it completely
Have a look at my weblog - diets That Work