tag:blogger.com,1999:blog-57089818915768971992024-03-25T10:19:21.558-07:00Your wish is my command-lineLiron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-5708981891576897199.post-60753040546855880342010-02-02T05:05:00.001-08:002010-02-02T05:29:14.053-08:00PropertyGrid Control and Complex Type ObjectFor one of my last projects I decided to use the PropertyGrid Control, I assume it would be nice to use it as an editor for my complex type object.<br /><br />Cheerful as I was it turn to be not such an easy mission, apparently the PropertyGrid Control can handle privitive types, collections and enums, but when it comes to complex type objects it need to be told what will be the way to edit them.<br /><br />Here is the PropertyGrid as it was displayed originaly:<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDNL6-fBPqzNZPZ-A_o-r9MiXCCLTjayosh2ElOLlif5ePJu_OksvIYEy2GQfBBpudu0meOUnHlASw2eW_lUYYaavLj39HBLTY_0IxFLYWPGTppCne73sOWepQNwS6owPh0YcJN2u8lvTn/s1600-h/1.JPG"><img id="BLOGGER_PHOTO_ID_5433632310270615442" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 256px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDNL6-fBPqzNZPZ-A_o-r9MiXCCLTjayosh2ElOLlif5ePJu_OksvIYEy2GQfBBpudu0meOUnHlASw2eW_lUYYaavLj39HBLTY_0IxFLYWPGTppCne73sOWepQNwS6owPh0YcJN2u8lvTn/s320/1.JPG" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><p>As you can see, the complex type “Manager” is not editable !!!<br /><br />In order to make it editable it needs to be define with Editor Attribute, as such:<br /><br />[<span style="color:#000000;">Editor(typeof(MyUITypeEditor),typeof(UITypeEditor))]</span> </p><p>In order to use this custom UITypeEditor, we’ll need to create two thins:<br />1. MyUITypeEditor - Based on the UITypeEditor.<br />2. UIMyClassEditorForm – The form that will be displayed whenever we’ll click the complex type for editing.<br /><br />I really wanted this to be generic as I could so my UIMyClassEditorForm contains a PropertyGrid Control for editing the object pass through.<br /><br />So now, when clicking the Manager property we should be abe to edit it and the screen will look like this:</p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrRiblNmJTWzczfiDEtmOSQF_0dRfCmPzLOswJfazGBJhpB8As3V23U4_td5sS366VVHLHe82AOBSCcfHaGpy0pDhb64qXJeAOZOosEg4Y29Vkt9t_FKbuPGx4qEu7zixUNFKUtnK3udME/s1600-h/2.JPG"><img id="BLOGGER_PHOTO_ID_5433632841601519554" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 241px" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrRiblNmJTWzczfiDEtmOSQF_0dRfCmPzLOswJfazGBJhpB8As3V23U4_td5sS366VVHLHe82AOBSCcfHaGpy0pDhb64qXJeAOZOosEg4Y29Vkt9t_FKbuPGx4qEu7zixUNFKUtnK3udME/s320/2.JPG" border="0" /></a><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitkYpgYtB5C-7-J_3avnfUAF8maDLQaxs1lrHEBNdFUqBKprnPfshmldLg40o82eBtGcM3n7rTaTKRdMk-dzl80aeGqOdgxEjNWKa8K4TMdtAnM7X3i2p4OfEZ8qjpeRGcM0sBk3G0Y6oJ/s1600-h/2.JPG"></a><div></div><div>Here is the source code:<br /><br /><strong><u><span style="color:#000099;">Person.cs</span></u></strong><br />public class Person<br />{<br />public enum City<br />{<br />NewYork,<br />TelAviv,<br />Rome<br />}<br /><br />public Person() { }<br />public Person(string firstName, string lastName,int age, City myCity)<br />{<br />this.FirstName = firstName;<br />this.LastName = lastName;<br />this.Age = age;<br />this.MyCity = myCity;<br />this.Manager = new Person();<br />}<br /><br />List<person> children = new List<person>();<br />public string FirstName { get; set; }<br />public string LastName { get; set; }<br />public int Age { get; set; }<br />public City MyCity { get; set; }<br />public List<person> Children<br />{<br />get { return children; }<br />}<br /><br />[Editor(typeof(MyUITypeEditor),typeof(UITypeEditor))]<br />public Person Manager{ get; set; }<br /><br />public override string ToString()<br />{<br />return string.Format("{0},{1}", FirstName, LastName);<br />}<br /><br />} </div><div> </div><div><strong><span style="color:#000099;"><u>MyProperyGridSampleForm.cs</u></span></strong><br />public partial class MyProperyGridSampleForm : Form<br />{<br /><br /><br />public MyProperyGridSampleForm()<br />{<br />InitializeComponent();<br />}<br /><br />private void EditPersonButton_Click(object sender, EventArgs e)<br />{<br />Person myTestEntity = new Person();<br />myTestEntity.FirstName = "John";<br />myTestEntity.LastName = "Smith";<br />myTestEntity.Age = 29;<br />myTestEntity.MyCity = Person.City.NewYork;<br />myTestEntity.Manager = new Person("Liron", "Leybovich", 33, Person.City.TelAviv);<br /><br />propertyGrid1.SelectedObject = myTestEntity;<br />}<br />} </div><div> </div><div><u><strong><span style="color:#000099;">UIMyClassEditorForm.cs</span></strong></u><br />public partial class UIMyClassEditorForm : Form<br />{<br />public object MyClass;<br />public IWindowsFormsEditorService _wfes;<br /><br /><br />public UIMyClassEditorForm()<br />{<br />InitializeComponent();<br />TopLevel = false;<br />}<br /><br />private void UIMyClassEditorForm_Load(object sender, EventArgs e)<br />{<br />this.propertyGrid1.SelectedObject = MyClass;<br />}<br /><br />protected override void OnClosed(EventArgs e)<br />{<br />base.OnClosed(e);<br />_wfes.CloseDropDown();<br />} </div><div> </div><div><br /><u><strong><span style="color:#000099;">MyUITypeEditor.cs<br /></span></strong></u>public class MyUITypeEditor : UITypeEditor<br />{<br />public override UITypeEditorEditStyle GetEditStyle(<br />ITypeDescriptorContext context)<br />{<br />return UITypeEditorEditStyle.Modal;<br />}<br /><br /><br />#region Edit Value<br />public override object EditValue(ITypeDescriptorContext context,<br />IServiceProvider provider,<br />object value)<br />{<br />IWindowsFormsEditorService wfes = provider.GetService(<br />typeof(IWindowsFormsEditorService)) as<br />IWindowsFormsEditorService;<br /><br />if (wfes == null) { return value; }<br /><br />UIMyClassEditorForm form = new UIMyClassEditorForm();<br /><br />if (value != null)<br />{<br />form.MyClass = value;<br />}<br />else<br />{<br />form.MyClass = new object();<br />}<br /><br />form._wfes = wfes;<br /><br />wfes.DropDownControl(form);<br /><br />return value;<br />}<br />#endregion<br /><br />}<br /><br />All the best….<br />Liron</div>Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com34tag:blogger.com,1999:blog-5708981891576897199.post-74446042612169378012010-01-19T00:34:00.000-08:002010-01-19T01:04:40.431-08:00How to update ShowInFileDlg programmatically<p><a name="OLE_LINK2"></a><a name="OLE_LINK1"></a><br />At some point in your SharePoint development life time you will probably need to update the ShowInFileDlg attribute of a Site Column.<br /><br />If you will try to do that by a feature and update the XML with new Field's attributes values, the changes will only take effect on new instances, and will not effect on exsisting ContentTypes or Lists that use these Site Columns.<br /><br />Programmatically updating the Site Column and the Content Type, the changes will be deployed to the children as well.<br /><br />Here is a generic method for updating any attribute of the Field element and forcing the changes to the Content Type and its children:<br /><br /></p> public void UpdateFieldAttribute(string siteCollectionURL, string siteColumnName, string contentTypeName, string fieldAttributeName, string fieldAttributeValue)<br /> {<br /> SPSite site = null;<br /> SPWeb web = null;<br /> try<br /> {<br /> using (site = new SPSite(siteCollectionURL))<br /> {<br /> using (web = site.OpenWeb())<br /> {<br /><br /> SPField siteColumn = site.RootWeb.Fields.GetField(siteColumnName);<br /> XmlDocument fieldSchemaXml = new XmlDocument();<br /> fieldSchemaXml.LoadXml(siteColumn.SchemaXml);<br /> XmlNode fieldXmlNode = fieldSchemaXml.SelectSingleNode("Field");<br /> XmlAttribute attr = fieldXmlNode.Attributes[fieldAttributeName]; <br /> attr.InnerText = fieldAttributeValue; ;<br /><br /> siteColumn.SchemaXml = fieldXmlNode.OuterXml;<br /> siteColumn.Update(true);<br /><br /> SPContentType contentType = site.RootWeb.ContentTypes[contentTypeName];<br /><br /> contentType.Update(true, false); //Updating the content type is important or the changes will not be reflected<br /> }<br /> }<br /> }<br /> finally<br /> {<br /> if (web != null)<br /> web.Dispose();<br /> if (site != null)<br /> site.Dispose();<br /> }<br /> }Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com38tag:blogger.com,1999:blog-5708981891576897199.post-15212557717019089222010-01-14T06:44:00.000-08:002010-01-14T07:58:32.545-08:00SharePoint Search Services Error HRESULT: 0x80040D1B<span style="font-family:arial;">You might facing an issue when clicking the Search Settings in your SSP:</span><br /><span style="font-family:Arial;color:#3366ff;"><em>Exception from HRESULT: 0x80040D1B at Microsoft.SharePoint.Portal.Search.Admin.Pages.SearchAdminPageBase.ErrorHandler(Object sender, EventArgs e) at Microsoft.SharePoint.Portal.Search.Admin.Pages.SearchSSPAdminPageBase.OnError(EventArgs e) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP._layouts_searchsspsettings_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)</em></span><br /><span style="font-family:Arial;"></span><br /><span style="font-family:arial;">In order to solve this issue you will need to do the following:</span><br /><span style="font-family:Arial;"></span><br /><ol><li><span style="font-family:arial;">Make sure to add the service account to the local SharePoint backup operators group on all SharePoint servers.<br /><br /></span></li><li><span style="font-family:arial;">Set your service name principle account for your SSP on your SharePoint application server. In order to complete this operation you must install Window support tools. Run these commands and all SharePoint web servers:<br />setspn.exe -A HTTP/sharepointsite domain\service account<br />setspn.exe -A HTTP/sharepoint.domainname site domain\service account<br /><br /></span><span style="font-family:arial;">(Make sure you have the right privileges to run the setspn.exe, usually you will need the domain admin)<br /><br /></li></span><li><span style="font-family:arial;">On Central administration - Operations - Services on Server<br />Stop Office SharePoint Server Search.<br /><br /></span></li><li><span style="font-family:arial;">Then go to Central administration - Operations - Service accounts.<br />Click on web application pool.<br />Under web service choose Windows SharePoint Service Web application.<br />Under application pool, choose your Shared Service Provider application pool account.<br />Re-enter your password and click ok.<br /><br /></span></li><li><span style="font-family:arial;">Do iisrest in all SharePoint servers.<br /><br /></span></li><li><span style="font-family:arial;">In Central administration - Operations - Services on Server<br />Restart your Office Server Search.<br /><br /></span></li><li><span style="font-family:arial;">In Central administration - Application Management - Create or configure Farm's Shared Services.<br /></span><span style="font-family:arial;">In the default SSP and click edit properties.<br /></span><span style="font-family:arial;">In the SSP service credentials enter username and password.<br /></span><span style="font-family:arial;">In the index server category select your index server and then click ok.<br /></span><span style="font-family:arial;">Make sure you wait about 5 minutes. (You need to do this for all SSPs)</span></li></ol><p><span style="font-family:Arial;">Good luck...</span></p><p><span style="font-family:Arial;">Liron</span></p>Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com25tag:blogger.com,1999:blog-5708981891576897199.post-27128938695083511962009-03-11T07:33:00.000-07:002009-03-11T10:28:56.876-07:00MOSS Search PDF 64-bit using IFilter 9<p><br /><span style="font-family:arial;"><strong><u>Install the PDF Ifilter 9 for 64-bit</u></strong></span></p><ol><li><span style="font-family:arial;">Download and extract the contents of "</span><a href="http://download.adobe.com/pub/adobe/acrobat/win/9.x/PDFiFilter64installer.zip"><span style="font-family:arial;">PDFiFilter64installer.zip</span></a><span style="font-family:arial;">" to your local drive. </span></li><li><span style="font-family:arial;">Double click "PDFFilter64installer.msi" to launch the installer. </span></li><li><span style="font-family:arial;">Follow the instructions in the installer wizard to complete the installation. </span></li><li><span style="font-family:arial;">After installing the PDF iFilter, it is recommended that you set your system PATH environment variable to the "bin" folder of the "Ifilter" installation. For example, from the "Control Panel\System\Advanced\Environment Variables" tab, append to PATH "C:\Program Files\Adobe\Adobe PDF iFilter 9 for 64-bit platforms\bin\" and then restart the computer.</span></li><li><span style="font-family:arial;">Follow the </span><a href="http://www.adobe.com/special/acrobat/configuring_pdf_ifilter_for_ms_sharepoint_2007.pdf"><span style="font-family:arial;">Sharepoint IFilter Configuration Guide</span></a><span style="font-family:arial;"> </span><span style="font-family:arial;"><br /></span></li></ol><p><span style="font-family:arial;"><strong><u>Add the PDF extension to Search File Types</u></strong></span></p><ol><li><span style="font-family:arial;">SharePoint Server Search Administration page by adding ‘pdf’ to list of File Types in Search Administration->File Types</li></ol><u><strong></strong></u></span><p><span style="font-family:arial;"><u><strong>Add the PDF File Icon to MOSS</strong></u></span></p><span style="font-family:arial;"><u><strong><ol><li></strong></u>Download the icon for pdf file from </span><a href="http://www.adobe.com/images/pdficon_small.gif"><span style="font-family:arial;">http://www.adobe.com/images/pdficon_small.gif</span></a><span style="font-family:arial;"> , save it to <moss>\TEMPLATE\IMAGES directory and name it pdficon_small.gif.</span></li><li><span style="font-family:arial;">Open the docicon.xml file from .<moss>\template\xml .</span></li><li><span style="font-family:arial;">Add a new Mapping element to the ByExtension element.<mapping key="pdf" value="pdficon_small.gif"></span></li><li><span style="font-family:arial;">Save the docicon.xml file.</span></li><li><span style="font-family:arial;">Restart IIS using iisreset command line.</span></li></ol><span style="font-family:arial;"><p><br /><strong><u>Restart all SharePoint services as well as IIS. </u></strong></p><ol><li>Run these command-lines:<br />“net stop osearch”. Wait for success message.<br />“net start osearch”. Wait for success message. </li><li>Restart IIS using iisreset command line and wait for success message. </li></ol><p></p><p><u><strong>Re-Crawl</strong></u></p><p>Make sure that you Full Crawl !!!</p><p><u></u></p><p><u><em><strong></strong></em></u></p><p><u><em><strong>*** Troubleshooting ***</strong></em></u></p><p><em>Important step that will solve this error message "The filtering process could not process this item. This might be because you do not have the latest file filter for this type of item. Install the corresponding filter and retry your crawl."</em></p><p><em>Make sure to change the </em><a href="file://hkey_local_machine/SOFTWARE/Microsoft/Office"><em>\\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office</em></a><em> Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdf to the GUID {E8978DA6-047F-4E3D-9C78-CDBE46041603}. The original value was {4C904448-74A9-11D0-AF6E-00C04FD8DC02}. (thanks to <a href="http://sharepointsolutions.blogspot.com/2009/01/installing-adobes-64-bit-pdf-ifilter-9.html">Russell Wright </a>for that one)</em></p><p><em></em></p></span><p><u><span style="font-family:arial;"></span></u></p><p><u><span style="font-family:arial;">URLs:</span></u></p><p><a href="http://download.adobe.com/pub/adobe/acrobat/win/9.x/PDFiFilter64installer.zip"><span style="font-family:arial;">http://download.adobe.com/pub/adobe/acrobat/win/9.x/PDFiFilter64installer.zip</span></a><br /><a href="http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025"><span style="font-family:arial;">http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025</span></a><br /><a href="http://support.microsoft.com/default.aspx/kb/832809"><span style="font-family:arial;">http://support.microsoft.com/default.aspx/kb/832809</span></a><br /><a href="http://www.adobe.com/special/acrobat/configuring_pdf_ifilter_for_ms_sharepoint_2007.pdf"><span style="font-family:arial;">http://www.adobe.com/special/acrobat/configuring_pdf_ifilter_for_ms_sharepoint_2007.pdf</span></a><br /><a href="http://www.adobe.com/images/pdficon_small.gif"><span style="font-family:arial;">http://www.adobe.com/images/pdficon_small.gif</span></a><span style="font-family:arial;"><br /></span><a href="http://sharepointsolutions.blogspot.com/2009/01/installing-adobes-64-bit-pdf-ifilter-9.html">http://sharepointsolutions.blogspot.com/2009/01/installing-adobes-64-bit-pdf-ifilter-9.html</a></p><p><span style="font-family:arial;"></span></p><p><span style="font-family:arial;"></span></p>Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com32tag:blogger.com,1999:blog-5708981891576897199.post-32548843710683104792009-03-05T00:24:00.000-08:002009-03-05T00:47:24.375-08:00WebService "Service Unavailable" error messageWhen changing the application pool user it is important to add the user to the IIS_WPG group.<br /><br />Yesterday, we so this error message and found the solution <a href="http://support.microsoft.com/kb/823552">here</a> which says that the reason for this kind of error message may be because one of the following occurs:<br /><ol><li>The application pool is not running. </li><li>The application pool account uses an incorrect password. </li><li>The application pool account is not a member of both the IIS_WPG group and the STS_WPG group on the server.</li></ol><p>In our case it was the third one, after adding the application pool user to the IIS_WPG group the WebService run like a magic.....</p>Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com69tag:blogger.com,1999:blog-5708981891576897199.post-22834631198658263412009-03-04T00:41:00.000-08:002009-03-04T23:51:49.479-08:00MOSS S.W.A.T BlogHi All,<br /><br />Just wanted to let you all know about a new blog i'm involved in...<br />The promising MOSS S.W.A.T Blog running by a highlly experiance MOSS team , I'm bribed cause it's my team :-) , but you can check it out and add it to your "Favorites" folder since there are new posts on daily basis.<br /><br /><a href="http://mosswat.blogspot.com/">In Moss We Trust </a>: <a href="http://mosswat.blogspot.com/">http://mosswat.blogspot.com/</a><br /><br />I hope it would be interesting and handy.<br /><br />LironLiron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com2tag:blogger.com,1999:blog-5708981891576897199.post-30150159074732389942008-04-25T13:05:00.000-07:002008-04-25T13:08:53.035-07:00Enterprise Search VideosWatch the following Training Videos on Enterprise Search that were published on TechNet:<br /><a href="http://go.microsoft.com/fwlink/?LinkId=115635&clcid=0x409" target="_blank">Module 1: Workshop Overview</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115636&clcid=0x409">Module 2: Enterprise Search Overview</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115637&clcid=0x409">Module 3: SharePoint Search 2007 Walkthrough</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115638&clcid=0x409">Module 4: Search Architecture and Deployment Scenarios</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115639&clcid=0x409">Module 5: Crawl and Query Processes</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115640&clcid=0x409">Module 6: Relevance Ranking</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115641&clcid=0x409">Module 7: Customizing the End-User Experience</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115642&clcid=0x409">Module 8: Developing Search Solutions</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115643&clcid=0x409">Module 9: Business Data Catalog Search</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115644&clcid=0x409">Module 10: Extensibility and Integration for Search</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115646&clcid=0x409">Module 11: Search Administration</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115647&clcid=0x409">Module 12: Security for Search</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115648&clcid=0x409">Module 13: Performance Scalability and Capacity Planning for Search</a><br /><a href="http://go.microsoft.com/fwlink/?LinkId=115649&clcid=0x409">Module 14: Search Operations</a><br /><br />Enjoy,<br /><br />LironLiron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com2tag:blogger.com,1999:blog-5708981891576897199.post-73963467108645179362008-01-23T03:45:00.000-08:002008-01-24T23:52:57.804-08:00Off Topic:Guten Morgen GermanyThat is good morning in German, the weather is ok, and the food is fine (lots of sausages and beer)...<br /><br />I'm staying in Darmstadt, located a little south of <a title="Frankfurt" href="http://wikitravel.org/en/Frankfurt">Frankfurt</a>.<br />Got here to participate in two webMethods courses at SoftwareAG (yep, I know...it's not part of the MS technology) and till now it's interesting and easy.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq_B3oBXZwvjNME31VXKSex5uxJI0PKbLI1_XQ4Ctbc1msdJtKDr5e19QP7P9iwScAsGqOFln8P_9WLuLY6aLI263R3V6ut7d-42LbxZr2coFE_cuHSpkdWnNQOYFinHkzah4pdcuaDARa/s1600-h/PICT0004.JPG"><img id="BLOGGER_PHOTO_ID_5159318672594103922" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq_B3oBXZwvjNME31VXKSex5uxJI0PKbLI1_XQ4Ctbc1msdJtKDr5e19QP7P9iwScAsGqOFln8P_9WLuLY6aLI263R3V6ut7d-42LbxZr2coFE_cuHSpkdWnNQOYFinHkzah4pdcuaDARa/s320/PICT0004.JPG" border="0" /></a><br /><br />Darmstadt is a small city and most pedestrians don't speak English and guess what - my German is not so good either....so it's a little bit difficult to manage around.<br /><br />I'm planning to visit here the original <a class="external text" title="http://www.burg-frankenstein.de/" href="http://www.burg-frankenstein.de/">Castle Frankenstein</a> and to visit <a href="http://wikitravel.org/en/Heidelberg">Heidelberg </a>on the weekend.<br /><br />If you happend to see me down the street....say hi :-)Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com138tag:blogger.com,1999:blog-5708981891576897199.post-85221154954063567632008-01-16T04:26:00.000-08:002008-01-16T05:00:23.561-08:00MOSS Search for emails and attachments contextSome of our customers requested to have the ability to search context within email messages and within its attachments.<br /><br />Searching the web for a solution came with results that indicate that a third-party development is needed to achieve this ability...<br />Then I found Gavin Adams <a href="http://blog.gavin-adams.com/2007/10/09/enabling-the-inbuilt-msg-ifilter-on-sharepoint-even-64bit/">post </a>and Tom Vandaele <a href="http://trycatch.be/blogs/tom/archive/2007/11/05/build-in-msg-ifilter-on-moss-2007.aspx">post</a> that wrote that the ability to deep search within msg files is a MOSS out-of-the-box option that need to be configure.<br /><br />Followed their instructions I tried to search context in a docx file attachment with in a msg file that was uploaded to a document library. I succeed to get the msg file by searching its context , but failed to get results related to the email's attachments.<br /><br />After some tests of my own, I figure out that the registry should look like that:<br /><ol><li> Make sure that this key exists in the MOSS registry<br /><strong>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\.msg </strong></li><li>Add these keys and values to the .msg<br /><strong>“Extension”=”msg”<br />“FileTypeBucket”=dword:00000001<br />“MimeTypes”=”application/msoutlook” </strong></li></ol><p><br />The MimeTypes <u>application/msoutlook</u> is the one I use to gain the deep search ability (couldn't do it using the MimeTypes = application/vnd.ms-outlook) </p><p><br />A note to those of you using hebrew documents, I checked it and it's working for hebrew attachments as well. </p><p>Lirliron</p>Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com161tag:blogger.com,1999:blog-5708981891576897199.post-22911130622722654812008-01-13T05:14:00.000-08:002008-01-13T05:47:13.719-08:00File size limitationHi all,<br /><br />Lately I faced a problem when tried to upload a huge size file and got an Oversize limitation error message,<br />searching the SharePoint administration came out with nothing.<br /><br />I found the solution within the STSADM.EXE:<br /><br />stsadm -o setproperty -propertyname max-file-post-size -propertyvalue 120 -url <a href="http://myportalserver/">http://myportalserver/</a><br /><br />The propertyvalue represent a numerical value, in megabytes (MB).<br /><br />Make sure to set the site size limitation as well.Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com3tag:blogger.com,1999:blog-5708981891576897199.post-38880137629212763842007-08-27T23:55:00.000-07:002007-08-28T00:47:24.838-07:00Send Link By Email - Broken URLFor a few weeks, we are facing a problem when trying to send a link to a document from the document library (This occurs only for documents with a non English file name).<br />Clicking on the "Send To-> Send Link By Email" opens the new message window, but with a broken URL to the document.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwi-KFjKZQOgfSmoylkUFYmrUUqbRkjLvzgecN-GoRgMwUU8xc_vLVu1LUEc4wAcUBONQMHtSziLaNlH9aQKM5-4ZxGbKR6AB27YSx4CvZNfs57rUUywL0vYIVeepCrv8AKfj6bnXWUyeL/s1600-h/Image1.jpg"><img id="BLOGGER_PHOTO_ID_5103644633565664834" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwi-KFjKZQOgfSmoylkUFYmrUUqbRkjLvzgecN-GoRgMwUU8xc_vLVu1LUEc4wAcUBONQMHtSziLaNlH9aQKM5-4ZxGbKR6AB27YSx4CvZNfs57rUUywL0vYIVeepCrv8AKfj6bnXWUyeL/s320/Image1.jpg" border="0" /></a><br /><br /><br />Last night I cleared some time for this issue. After searching the MOSS javascripts I found the solution !!!<br />Within the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1037 Directory (1037 is for the Hebrew version) there is a js file named CORE.JS, inside is located the AddSendSubMenu function, this function generate the "Send" sub-menu that appear when clicking on a list item.<br /><br />In order to solve the broken URL problem, find this line:<br /><span style="color:#ff0000;">fileUrl=escapeProperly(httpRootWithSlash.substr(0, slashLoc))+currentItemUrl;</span><br /><br />And replace it with this line:<br /><span style="color:#009900;">fileUrl=escapeProperly(httpRootWithSlash.substr(0, slashLoc))+currentItemEscapedFileUrl;</span><br /><br /><br />Save the file, and now after clicking the "Send Link By Email" .....<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl-KxBNQp6Q-MXTkmS54qAd_jJIJHuIoy22FDFR3M-xIoShww7Uxn7IecTb9jAujEns5wBeWgr-L0vTQ6NHd-ezRy2VCmUA_EdIBA5lkev7XVRkbWbYAqC5ximhbvSSFpjJToFmM9Kn-3p/s1600-h/Image2.jpg"><img id="BLOGGER_PHOTO_ID_5103648206978455122" style="CURSOR: hand" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl-KxBNQp6Q-MXTkmS54qAd_jJIJHuIoy22FDFR3M-xIoShww7Uxn7IecTb9jAujEns5wBeWgr-L0vTQ6NHd-ezRy2VCmUA_EdIBA5lkev7XVRkbWbYAqC5ximhbvSSFpjJToFmM9Kn-3p/s320/Image2.jpg" border="0" /></a><br /><br />I hope this solution will be of use for you....Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com131tag:blogger.com,1999:blog-5708981891576897199.post-80937139112600133732007-08-26T23:43:00.000-07:002007-08-26T23:45:38.766-07:00SharePoint Server 2007 SDK including the new BDC Definition Editor<P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt; DIRECTION: ltr; TEXT-ALIGN: left"><FONT face=Calibri size=3>Microsoft just announced the update for </FONT><A href="http://www.microsoft.com/downloads/details.aspx?familyid=6d94e307-67d9-41ac-b2d6-0074d6286fa9&displaylang=en"><FONT face=Calibri color=#800080 size=3>SharePoint Server 2007 SDK: Software Development Kit</FONT></A> </P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt; DIRECTION: ltr; TEXT-ALIGN: left">the highlight for this update is the new Business Data Catalog Definition Editor.</P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt; DIRECTION: ltr; TEXT-ALIGN: left"> </P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt; DIRECTION: ltr; TEXT-ALIGN: left"><FONT size=3><FONT face=Calibri>Here are few of the SDK features, new samples and tool are in <B>bold:</B></FONT></FONT> </P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 18pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol"><SPAN>·<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Business Data Catalog Samples and Utilities </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><B><SPAN>Microsoft Business Data Catalog Definition Editor</SPAN></B><SPAN> </SPAN></FONT></FONT></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Sample Pluggable SSO Provider </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><B><SPAN>WSHelloWorld Web Service</SPAN></B><SPAN> </SPAN></FONT></FONT></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>WSOrders Web Service </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><B><SPAN>Excel Services User Defined Function Sample</SPAN></B><SPAN> </SPAN></FONT></FONT></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><B><SPAN>WSOrders Custom Proxy Sample</SPAN></B><SPAN> </SPAN></FONT></FONT></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Amazon Web Service Sample </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><SPAN>AdventureWorks</SPAN><SPAN> Metadata</SPAN><SPAN> Samples </SPAN></FONT></FONT></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><B><SPAN>SAP</SPAN></B><B><SPAN> Sample</SPAN></B><SPAN></SPAN></FONT></FONT> </P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 18pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol"><SPAN>·<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Document Management and Content Processing Samples </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Comment Scrub Document Converter </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Term Replacement Document Inspector</FONT></FONT></SPAN> </P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 18pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol"><SPAN>·<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Search Samples </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><B><SPAN>Sample Protocol Handler</SPAN></B><SPAN> </SPAN></FONT></FONT></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><B><SPAN>Custom Content Source</SPAN></B><SPAN></SPAN></FONT></FONT> </P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 18pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol"><SPAN>·<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Records Management and Policy Samples </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>De-Duplication Router </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Document Integrity Verifier </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><SPAN>Records</SPAN><SPAN> Center</SPAN><SPAN> Web Service Console Application </SPAN></FONT></FONT></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Search, Collect, and Hold Tool </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Sample Custom Barcode Generator </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><B><SPAN>IRM</SPAN></B><B><SPAN> Document Protector</SPAN></B><SPAN></SPAN></FONT></FONT> </P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 18pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol"><SPAN>·<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Workflow Samples </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Custom Workflow Report Query Generator </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Custom Workflow Report XLSX Injector </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Visual Studio Workflow Templates </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><FONT size=3><FONT face=Calibri><SPAN>Enterprise</SPAN><SPAN> Content Management Workflow Activities </SPAN></FONT></FONT></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>List Item Activities </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Hello World Sequential Workflow </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>State Based Approval Workflow </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Modification Workflow </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Replication and Contact Selector Workflow </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Intersystem Purchase Order </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Confidential Approval Workflow </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Group Approval Workflow </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Approval Workflow Sample </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Multi-Stage Workflow </FONT></FONT></SPAN></P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt 54pt; DIRECTION: ltr; TEXT-INDENT: -18pt; LINE-HEIGHT: normal; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN>o<SPAN> </SPAN></SPAN></SPAN><SPAN dir=ltr></SPAN><SPAN><FONT size=3><FONT face=Calibri>Server-side Collect Signatures Workflow</FONT></FONT></SPAN> </P> <P class=MsoNormal dir=ltr style="MARGIN: 0cm 0cm 10pt; DIRECTION: ltr; TEXT-ALIGN: left"><FONT face=Calibri size=3></FONT> </P>Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com31tag:blogger.com,1999:blog-5708981891576897199.post-85965851390164107242007-08-10T12:19:00.000-07:002007-08-10T12:33:41.264-07:00CAML BuilderI just bumped into a fine CAML Builder tool from the <a href="http://www.u2u.info/">U2U site</a>.<br /><a href="http://www.u2u.info/SharePoint/U2U%20Community%20Tools/U2U%20CAML%20Query%20Builder%202007%20RTM.zip">http://www.u2u.info/SharePoint/U2U%20Community%20Tools/U2U%20CAML%20Query%20Builder%202007%20RTM.zip</a><br /><br />I used it and it's grate !!!<br /><br />Have a nice weekend,<br />LironLiron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com24tag:blogger.com,1999:blog-5708981891576897199.post-24992864325460905922007-08-08T23:41:00.000-07:002007-08-10T12:34:04.335-07:00MOSS List Event Receiver Register application<p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; LINE-HEIGHT: 18pt; TEXT-ALIGN: left"><span style="font-size:100%;"><span style="font-family:Arial;color:#333333;">We developed an ItemEventReceiver to do somthing whenever a list item is added to a list.</span></span><span style="font-family:Verdana;color:#333333;"><span style="font-size:100%;"> </span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; LINE-HEIGHT: 18pt; TEXT-ALIGN: left"><span style="font-size:100%;"><span style="font-family:Arial;color:#333333;">In order to register this ItemEventReceiver to a list I created a WinForm application that should run on the MOSS and should register the ItemEventReceiver assembly to the list.</span><span style="font-family:Verdana;color:#333333;"> </span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; LINE-HEIGHT: 18pt; TEXT-ALIGN: left"><span style="font-family:Verdana;color:#333333;"><span style="font-size:100%;"></span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 12pt; DIRECTION: ltr; LINE-HEIGHT: 18pt; TEXT-ALIGN: left"><span style="font-size:100%;"><span style="font-family:Arial;color:#333333;">The application has the abbility to add the ItemEventReceiver assembly to any of the list item's available Event Types.</span><span style="font-family:Verdana;color:#333333;"> </span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; LINE-HEIGHT: 18pt; TEXT-ALIGN: left"><span style="font-family:Verdana;color:#333333;"><span style="font-size:100%;"></span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; LINE-HEIGHT: 18pt; TEXT-ALIGN: left"><span style="font-size:100%;"><span style="font-family:Arial;color:#333333;">This is a quite simple application:</span><span style="font-family:Verdana;color:#333333;"> </span></span></p><div style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 1em; PADDING-TOP: 1em; TEXT-ALIGN: left"><img style="cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit484VMCo9DeCQOo0PKfL2iqztm98n_D9XGpfR_hfqirVHp-7GztutFeIsc6tRPUEaqbX5EZoMNndf0nK2OiS9jJ-yDwaWPW7rtS-4zbyLImNNb_98PjdO25SJuPzw-G0P_qhVJW1I-5Ug/s400/MossListEventRegister.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5094200676073367298" /></div><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">using</span><span style="font-family:'Courier New';font-size:10;"> System; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">using</span><span style="font-family:'Courier New';font-size:10;"> System.Collections.Generic; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">using</span><span style="font-family:'Courier New';font-size:10;"> System.ComponentModel; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">using</span><span style="font-family:'Courier New';font-size:10;"> System.Data; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">using</span><span style="font-family:'Courier New';font-size:10;"> System.Drawing; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">using</span><span style="font-family:'Courier New';font-size:10;"> System.Text; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">using</span><span style="font-family:'Courier New';font-size:10;"> System.Windows.Forms; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">using</span><span style="font-family:'Courier New';font-size:10;"> Microsoft.SharePoint; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;color:blue;">namespace</span><span style="font-family:'Courier New';font-size:10;"> MOSSListEventRegister </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;">{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">public</span> <span style="color:blue;">partial</span> <span style="color:blue;">class</span> <span style="color:teal;">MOSSListEventRegisterForm</span> : <span style="color:teal;">Form </span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">public</span> MOSSListEventRegisterForm() </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>InitializeComponent(); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">private</span> <span style="color:blue;">void</span> MOSSListEventRegisterForm_Load(<span style="color:blue;">object</span> sender, <span style="color:teal;">EventArgs</span> e) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:green;">//Fill EventReceiverTypeCheckedListBox<span style="font-size:0;"> </span></span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemAdded"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemAdding"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemAttachmentAdded"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemAttachmentAdding"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemAttachmentDeleted"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemAttachmentDeleting"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemCheckedIn"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemCheckedOut"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemCheckingIn"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemCheckingOut"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemDeleted"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemDeleting"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemUpdated"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>EventReceiverTypeCheckedListBox.Items.Add(<span style="color:maroon;">"ItemUpdating"</span>); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">private</span> <span style="color:blue;">void</span> RegisterButton_Click(<span style="color:blue;">object</span> sender, <span style="color:teal;">EventArgs</span> e) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:teal;">SPSite</span> site = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:teal;">SPWeb</span> web = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:teal;">SPList</span> myList = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">try </span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>site = <span style="color:blue;">new</span> <span style="color:teal;">SPSite</span>(SiteURLTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>web = site.OpenWeb(); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList = web.Lists[ListsNameComboBox.SelectedText]; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">for</span> (<span style="color:blue;">int</span> i = 0; i < EventReceiverTypeCheckedListBox.Items.Count; i++) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">switch</span> (EventReceiverTypeCheckedListBox.Items.ToString()) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemAdded"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemAdded, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemAdding"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemAdding, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemAttachmentAdded"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemAttachmentAdded, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemAttachmentAdding"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemAttachmentAdding, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemAttachmentDeleted"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemAttachmentDeleted, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemAttachmentDeleting"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemAttachmentDeleting, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemCheckedIn"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemCheckedIn, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemCheckedOut"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemCheckedOut, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemCheckingIn"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemCheckingIn, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemCheckingOut"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemCheckingOut, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemDeleted"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemDeleted, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemDeleting"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemDeleting, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemUpdated"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemUpdated, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">case</span> <span style="color:maroon;">"ItemUpdating"</span>: </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>myList.EventReceivers.Add(<span style="color:teal;">SPEventReceiverType</span>.ItemUpdating, AssemblyNameTextBox.Text, ClassNameTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">break</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">catch</span> (<span style="color:teal;">Exception</span> ex) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:teal;">MessageBox</span>.Show(ex.Message); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">finally </span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">if</span> (site != <span style="color:blue;">null</span>) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>site.Close(); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>site = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">if</span> (web != <span style="color:blue;">null</span>) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>web.Close(); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>web = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">private</span> <span style="color:blue;">void</span> GetListsButton_Click(<span style="color:blue;">object</span> sender, <span style="color:teal;">EventArgs</span> e) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:teal;">SPSite</span> site = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:teal;">SPWeb</span> web = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:teal;">SPList</span> myList = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">try </span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>ListsNameComboBox.Items.Clear(); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>site = <span style="color:blue;">new</span> <span style="color:teal;">SPSite</span>(SiteURLTextBox.Text); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>web = site.OpenWeb(); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">foreach</span> (<span style="color:teal;">SPList</span> lst <span style="color:blue;">in</span> web.Lists) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">if</span> (!lst.Hidden ) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>ListsNameComboBox.Items.Add(lst.Title); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">catch</span> (<span style="color:teal;">Exception</span> ex) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:teal;">MessageBox</span>.Show(ex.Message); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">finally </span></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">if</span> (site != <span style="color:blue;">null</span>) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>site.Close(); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>site = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"></span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="color:blue;">if</span> (web != <span style="color:blue;">null</span>) </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>{ </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span><span style="font-size:0;"></span>web.Close(); </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>web = <span style="color:blue;">null</span>; </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;"><span style="font-size:0;"></span>} </span></p><p class="MsoNormal" dir="ltr" style="MARGIN: 0cm 0cm 0pt; DIRECTION: ltr; TEXT-ALIGN: left"><span style="font-family:'Courier New';font-size:10;">}</span> </p>Liron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com53tag:blogger.com,1999:blog-5708981891576897199.post-13801719507013683702007-07-31T23:58:00.000-07:002008-01-16T23:20:16.522-08:00BIOHi,<br /><br />My name is Liron Leybovich and I'm a Senior .Net developer & a team leader in an Israeli IT Software company.<br />My first love affair was at the age of 8 with a Texas Instrument computer (no games cassette were included, only two "Basic" programming books…).<br />On My spare time I like to ride my mountain bike in the woods and to spend time with my wife and children.<br /><br />I intend to write about technical issues regarding my experience as a .NET and Office System Developer.<br /><br />LironLiron Leybovichhttp://www.blogger.com/profile/00183176081710984245noreply@blogger.com5