|
द्वारा Udayakumar Ethirajulu , on November 26th, 2009 The following code snippet is used to retrieve the list of document libraries.
SPWeb _web = SPContext.Current.Web;
SPListCollection ListColl = _web.Lists;
foreach (SPList _lst in ListColl)
{
if (_lst.BaseTemplate == SPListTemplateType.DocumentLibrary)
November 26th, 2009 | टैग: काई 2007, SharePoint 2007, SharePoint ऑब्जेक्ट मॉडल | श्रेणी: काई 2007, SharePoint ऑब्जेक्ट मॉडल |
द्वारा Udayakumar Ethirajulu , on November 8th, 2009
Create Resource file using Visual Studio IDE
Copy the resource file into 12 hive resource folder
GetLocalized method from SPUtility to read the values from resource file
वाक्य-विन्यास:
SPUtility.GetLocalizedString(“$Resources:<<ResourceFileName,ResourceKeyName>>”, “<<ResourceFileName>>”, lang);
उदाहरण:
SPUtility.GetLocalizedString(“$Resources:MyResources,FirstName”, “MyResources”, lang);
Sample Source:
November 8th, 2009 | टैग: काई 2007, SharePoint 2007, SharePoint ऑब्जेक्ट मॉडल | श्रेणी: काई 2007, SharePoint ऑब्जेक्ट मॉडल |
द्वारा Udayakumar Ethirajulu , on October 3rd, 2009
SPAlerCollection class can be used to get the Alert Collection for the User.
The below code snippet is used to read all alerts registered for the site collection users.
private static void GetAlerts()
{
SPSite currSite = new SPSite(“http://उदय”);
SPWeb currWeb = currSite.OpenWeb();
SPUserCollection […]
द्वारा Udayakumar Ethirajulu , on October 2nd, 2009 To set the timer job interval for alerts can set by using the setproperty for the property job-immediate-alerts command in stsadm.
वाक्य-विन्यास:STSADM -o getproperty -pn job-immediate-alerts –pv <property value> -url <साइट का URL>
उदाहरण:STSADM -o getproperty -pn job-immediate-alerts –pv “every 2 minutes” -url http://उदय
[…]
द्वारा Udayakumar Ethirajulu , on October 1st, 2009 The below lines of code snippet is to update the infopath xml record(file)
SPWeb _web = SPContext.Current.Web; SPList _list = _web.Lists[“SampleFormLib”];
MemoryStream myInStream = new MemoryStream(item.File.OpenBinary()); XmlTextReader reader = new XmlTextReader(myInStream);
XmlDocument doc = new XmlDocument(); doc.Load(reader);
reader.Close(); myInStream.Close();
XmlNamespaceManager nameSpaceManager = new XmlNamespaceManager(doc.NameTable); nameSpaceManager.AddNamespace(“my”, “http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-06-11T12:44:57“);
doc.DocumentElement.SelectSingleNode(“my:Status”, nameSpaceManager).InnerText = “Saved”; […]
द्वारा Udayakumar Ethirajulu , 7 अगस्त को, 2009 प्राप्त करने के लिए अलर्ट के लिए टाइमर कार्य अंतराल stsadm में getProperty कमांड के प्रयोग के द्वारा प्राप्त किया जा सकता है.
वाक्य-विन्यास:Stsadm -o getProperty -pn कार्य तत्काल-अलर्ट -url <साइट का URL>
उदाहरण:
Stsadm -o getProperty -pn कार्य तत्काल-अलर्ट -url HTTP://उदय
द्वारा Udayakumar Ethirajulu , जुलाई 26 पर, 2009 SharePoint में नई आइकन के लिए अवधि निर्धारित करने के लिए (नए आइटम के बगल से पता चलता है जो सूचक) access the SharePoint WebApplication object and set the value for DaysToShowNewIndicator.
SPWebApplication WebApp = SPWebApplication.Lookup(new Uri(WebAppURL.Text));
WebApp.DaysToShowNewIndicator = 3;
WebApp.Update();
[…]
द्वारा Udayakumar Ethirajulu , on February 1st, 2009 SPDisposeCheck v1.3.1 has been released on MSDN Code Gallery, http://code.msdn.microsoft.com/SPDisposeCheck. This tool will help improve the quality of your SharePoint assemblies. It will inspect your SharePoint assemblies and check that you are correctly disposing of certain SharePoint objects (IDisposable objects which includes SPSite and SPWeb). The tool is based upon the guidance published in this […]
द्वारा Udayakumar Ethirajulu , on June 28th, 2007 हाय Devs,
The Below is the Sample Code to update the Sharepoint list content programmatically by using SharePoint Object Model.
SPSite Site = new SPSite(“http://लोकलहोस्ट:21000”); SPWeb Web = Site.OpenWeb(); SPList List = Web.Lists[“Address Book”]; SPListItem ListItem = List.GetItemById(0);
string FullName = string.Empty;
FullName = ListItem[“FirstName”].ToString() + ListItem[“LastName”].ToString(); SPListItem[“FullName”] = FullName; ListItem.Update();
|
|