<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Any Look Up &#187; Programming</title>
	<atom:link href="http://anylookup.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://anylookup.com</link>
	<description>Look Up Your IP Address, WHOIS Info, Horoscope, Fortune, Elven Name and More!</description>
	<lastBuildDate>Sat, 15 May 2010 23:27:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to really disable event firing in sharepoint</title>
		<link>http://anylookup.com/how-to-really-disable-event-firing-in-sharepoint</link>
		<comments>http://anylookup.com/how-to-really-disable-event-firing-in-sharepoint#comments</comments>
		<pubDate>Tue, 03 Feb 2009 20:14:18 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://anylookup.com/?p=37</guid>
		<description><![CDATA[One of the things I found out the hard way while programming event handlers in sharepoint is that you have to wrap your update() or delete() functions with the disableeventfiring function individually, for example:
this will work:
base.DisableEventFiring();
item.update();
base.EnableEventFiring();
this will NOT work:
base.DisableEventFiring();
item.update();
item.delete();
base.EnableEventFiring();
So the moral of the story is, only do one event triggering action at a time, do [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I found out the hard way while programming event handlers in sharepoint is that you have to wrap your update() or delete() functions with the disableeventfiring function individually, for example:</p>
<p>this will work:<br />
base.DisableEventFiring();<br />
item.update();<br />
base.EnableEventFiring();</p>
<p>this will NOT work:<br />
base.DisableEventFiring();<br />
item.update();<br />
item.delete();<br />
base.EnableEventFiring();</p>
<p>So the moral of the story is, only do one event triggering action at a time, do not try to do 2 or more within one wrapper.</p>
]]></content:encoded>
			<wfw:commentRss>http://anylookup.com/how-to-really-disable-event-firing-in-sharepoint/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to add or remove permissions to a list item in sharepoint</title>
		<link>http://anylookup.com/how-to-add-or-remove-permissions-to-a-list-item-in-sharepoint</link>
		<comments>http://anylookup.com/how-to-add-or-remove-permissions-to-a-list-item-in-sharepoint#comments</comments>
		<pubDate>Thu, 29 Jan 2009 15:09:46 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://anylookup.com/?p=35</guid>
		<description><![CDATA[Ok here is how I add or remove or copy permissions to a list item in sharepoint:



1
 if (properties.ListTitle.Equals(&#8220;Document Library&#8221;)) 


2
{


3
using (SPWeb objWeb = properties.OpenWeb()) 


4
{


5
SPListItem d_item = properties.ListItem; //this is the one I want to copy permission from



6
SPRoleAssignmentCollection roles = d_item.RoleAssignments;


7
SPListItem item = myFile.Item; //this is the one I want to copy permission to 


8
item.BreakRoleInheritance(true); //you must set this to true or it wouldn&#8217;t work



9
while (item.RoleAssignments.Count &#62; 0) 


10
{


11
item.RoleAssignments.Remove(0);


12
}


13
foreach (SPRoleAssignment role in roles) 


14
{


15
item.RoleAssignments.Add(role);


16
}


17
base.DisableEventFiring(); 


18
item.Update();


19
base.EnableEventFiring(); 


20
}


21
}



]]></description>
			<content:encoded><![CDATA[<p>Ok here is how I add or remove or copy permissions to a list item in sharepoint:</p>
<table style="border-width: 0px; margin: 2px 0px; width: 99%; border-collapse: collapse; background-color: #ffffff;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>1</td>
<td><span style="font-size: 11px;"> </span><span>if</span><span style="font-size: 11px;"> (properties.ListTitle.Equals(</span><span>&#8220;Document Library&#8221;</span><span style="font-size: 11px;">)) </span></td>
</tr>
<tr>
<td>2</td>
<td style="background-color: #f7f7f7;">{</td>
</tr>
<tr>
<td>3</td>
<td><span>using</span><span style="font-size: 11px;"> (SPWeb objWeb = properties.OpenWeb()) </span></td>
</tr>
<tr>
<td>4</td>
<td style="background-color: #f7f7f7;">{</td>
</tr>
<tr>
<td>5</td>
<td>SPListItem d_item = properties.ListItem; <span>//this is the one I want to copy permission from</span><span style="font-size: 11px;"><br />
</span></td>
</tr>
<tr>
<td>6</td>
<td style="background-color: #f7f7f7;">SPRoleAssignmentCollection roles = d_item.RoleAssignments;</td>
</tr>
<tr>
<td>7</td>
<td>SPListItem item = myFile.Item; <span>//this is the one I want to copy permission to</span><span style="font-size: 11px;"> </span></td>
</tr>
<tr>
<td>8</td>
<td style="background-color: #f7f7f7;">item.BreakRoleInheritance(<span>true</span><span style="font-size: 11px;">); <span style="color: #339966;">//you must set this to true or it wouldn&#8217;t work</span><br />
</span></td>
</tr>
<tr>
<td>9</td>
<td><span>while</span><span style="font-size: 11px;"> (item.RoleAssignments.Count &gt; 0) </span></td>
</tr>
<tr>
<td>10</td>
<td style="background-color: #f7f7f7;">{</td>
</tr>
<tr>
<td>11</td>
<td>item.RoleAssignments.Remove(0);</td>
</tr>
<tr>
<td>12</td>
<td style="background-color: #f7f7f7;">}</td>
</tr>
<tr>
<td>13</td>
<td><span>foreach</span><span style="font-size: 11px;"> (SPRoleAssignment role </span><span>in</span><span style="font-size: 11px;"> roles) </span></td>
</tr>
<tr>
<td>14</td>
<td style="background-color: #f7f7f7;">{</td>
</tr>
<tr>
<td>15</td>
<td>item.RoleAssignments.Add(role);</td>
</tr>
<tr>
<td>16</td>
<td style="background-color: #f7f7f7;">}</td>
</tr>
<tr>
<td>17</td>
<td><span>base</span><span style="font-size: 11px;">.DisableEventFiring(); </span></td>
</tr>
<tr>
<td>18</td>
<td style="background-color: #f7f7f7;">item.Update();</td>
</tr>
<tr>
<td>19</td>
<td><span>base</span><span style="font-size: 11px;">.EnableEventFiring(); </span></td>
</tr>
<tr>
<td>20</td>
<td style="background-color: #f7f7f7;">}</td>
</tr>
<tr>
<td>21</td>
<td>}</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://anylookup.com/how-to-add-or-remove-permissions-to-a-list-item-in-sharepoint/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to customize the item edit form in sharepoint designer</title>
		<link>http://anylookup.com/how-to-customize-the-item-edit-form-in-sharepoint-designer</link>
		<comments>http://anylookup.com/how-to-customize-the-item-edit-form-in-sharepoint-designer#comments</comments>
		<pubDate>Thu, 22 Jan 2009 15:45:47 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://anylookup.com/?p=33</guid>
		<description><![CDATA[I needed to customize the item edit / display / new form to remove some fields from the form. In SPD you can not convert the edit form to XSLT dataview. What you have to do is:
1. Hide the default form: Select the ListFormWebPart, right click and select web part properties. Go to layout and [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to customize the item edit / display / new form to remove some fields from the form. In SPD you can not convert the edit form to XSLT dataview. What you have to do is:</p>
<p>1. Hide the default form: Select the ListFormWebPart, right click and select web part properties. Go to layout and check hidden.<br />
2. Insert your custom form: Click on an empty area so nothing is selected. Then go to Insert->Sharepoint controls->Custom List form, then select the list you are modifying and select the type of form. Now you can modify or delete any field!</p>
]]></content:encoded>
			<wfw:commentRss>http://anylookup.com/how-to-customize-the-item-edit-form-in-sharepoint-designer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add, Remove, Manage List Columns in SharePoint Designer</title>
		<link>http://anylookup.com/how-to-add-remove-manage-list-columns-in-sharepoint-designer</link>
		<comments>http://anylookup.com/how-to-add-remove-manage-list-columns-in-sharepoint-designer#comments</comments>
		<pubDate>Tue, 13 Jan 2009 18:19:39 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://anylookup.com/?p=31</guid>
		<description><![CDATA[To Add/Remove/Manage columns in sharepoint designer(SPD), first open up the site in SPD then open up the view&#8217;s aspx file. In design mode, right click on the DataFormWebPart and select &#8220;convert to XLST data view&#8221;.
Now you should have a &#8220;Common data view tasks&#8221; popup, if not, just click on the arrow to the right. You [...]]]></description>
			<content:encoded><![CDATA[<p>To Add/Remove/Manage columns in sharepoint designer(SPD), first open up the site in SPD then open up the view&#8217;s aspx file. In design mode, right click on the DataFormWebPart and select &#8220;convert to XLST data view&#8221;.</p>
<p>Now you should have a &#8220;Common data view tasks&#8221; popup, if not, just click on the arrow to the right. You could then select &#8220;edit columns&#8221;. Now you will be able to add/remove/manage columns in SPD! Save the file when you done and your sharepoint site will be automatically updated with the new columns.</p>
]]></content:encoded>
			<wfw:commentRss>http://anylookup.com/how-to-add-remove-manage-list-columns-in-sharepoint-designer/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Int32.Parse Versus Convert.ToInt32 in SharePoint</title>
		<link>http://anylookup.com/int32parse-versus-converttoint32-in-sharepoint</link>
		<comments>http://anylookup.com/int32parse-versus-converttoint32-in-sharepoint#comments</comments>
		<pubDate>Mon, 12 Jan 2009 20:27:42 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://anylookup.com/?p=29</guid>
		<description><![CDATA[Today I found out the hard way that SharePoint doesn&#8217;t like the function Int32.Parse. I spent several hours trying to debug my code, then finally come to the conclusion that by using Int32.Parse to convert a int to string, it mysteriously prevents execution of everything that follows this line (although this compiles perfectly in VS2008).
The [...]]]></description>
			<content:encoded><![CDATA[<p>Today I found out the hard way that SharePoint doesn&#8217;t like the function Int32.Parse. I spent several hours trying to debug my code, then finally come to the conclusion that by using Int32.Parse to convert a int to string, it mysteriously prevents execution of everything that follows this line (although this compiles perfectly in VS2008).</p>
<p>The SharePoint correct way to convert int to string is to use the function Convert.ToInt32(myString), btw Convert is also faster than Parse, so I recommend everyone to stop using Parse and use Convert instead even if it is not sharepoint.</p>
]]></content:encoded>
			<wfw:commentRss>http://anylookup.com/int32parse-versus-converttoint32-in-sharepoint/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sharepoint Document Library Mass Upload Tool</title>
		<link>http://anylookup.com/sharepoint-document-library-mass-upload-tool</link>
		<comments>http://anylookup.com/sharepoint-document-library-mass-upload-tool#comments</comments>
		<pubDate>Tue, 06 Jan 2009 20:28:39 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://anylookup.com/?p=23</guid>
		<description><![CDATA[This is a tool written by Stuart Preston to enable us to mass upload files, folders and sub-folders into our sharepoint document library. The tool will automatically create the folders in sharepoint. There is no limit on the number of documents you could upload.
Download SPBulkUpload
How to use:
1. Extract the zip file, this is actually a [...]]]></description>
			<content:encoded><![CDATA[<p>This is a tool written by Stuart Preston to enable us to mass upload files, folders and sub-folders into our sharepoint document library. The tool will automatically create the folders in sharepoint. There is no limit on the number of documents you could upload.</p>
<p><a href='http://anylookup.com/wp-content/uploads/2009/01/conchangosharepointutilitiesbulkupload.zip'>Download SPBulkUpload</a></p>
<p>How to use:<br />
1. Extract the zip file, this is actually a Visual Studios project with source code.<br />
2. To start using the tool, copy the Conchango.Sharepoint.Utilities.BulkUpload.exe file from /bin/Debug folder to your C:\ root folder and rename it to something shorter like &#8220;spbulk.exe&#8221;.<br />
3. Open up command prompt (Start->Run->cmd)<br />
4. type: C: to go to your C:\ root<br />
5. type: spbulk &#8220;c:\source folder&#8221; &#8220;http://webapp/site/target/document_library&#8221;<br />
(replace the source folder and destination with your actual folder and site url)<br />
6. Wait for the tool to finish.</p>
]]></content:encoded>
			<wfw:commentRss>http://anylookup.com/sharepoint-document-library-mass-upload-tool/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>To show file extension in sharepoint document library</title>
		<link>http://anylookup.com/to-show-file-extension-in-sharepoint-document-library</link>
		<comments>http://anylookup.com/to-show-file-extension-in-sharepoint-document-library#comments</comments>
		<pubDate>Tue, 06 Jan 2009 18:41:04 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://anylookup.com/?p=19</guid>
		<description><![CDATA[1. Open up the .aspx file responsible for displaying the document list in Sharepoint Designer, in my case it is called AllItems.aspx
2. Select the WebPartPages:ListViewWebPart control. (It is the place where rows of document are listed)
3. Right-click on it, Convert to XSLT Data View
4. Go into the code and find the line that says:
&#60;xsl:value-of select="ddwrt:UrlBaseName(string(@LinkFilename))" [...]]]></description>
			<content:encoded><![CDATA[<p>1. Open up the .aspx file responsible for displaying the document list in Sharepoint Designer, in my case it is called AllItems.aspx</p>
<p>2. Select the WebPartPages:ListViewWebPart control. (It is the place where rows of document are listed)</p>
<p>3. Right-click on it, Convert to XSLT Data View</p>
<p>4. Go into the code and find the line that says:</p>
<p><code>&lt;xsl:value-of select="ddwrt:UrlBaseName(string(@LinkFilename))" /&gt;</code></p>
<p>5. Add this to the end of the line:</p>
<p><code>.&lt;xsl:value-of select="@File_x0020_Type" /&gt;</code></p>
<p>6. Save</p>
<p>Caution: after editing the file with sharepoint designer, you wouldn&#8217;t be able to edit it with anything else except maybe Visual Studio</p>
]]></content:encoded>
			<wfw:commentRss>http://anylookup.com/to-show-file-extension-in-sharepoint-document-library/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
