<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Inconvenient SPWeb.GetListItem (Exception from HRESULT: 0&#215;80070001)</title>
	<atom:link href="http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/</link>
	<description>Innovation Matters &#124; SharePoint Server MVP</description>
	<lastBuildDate>Mon, 26 Jul 2010 17:43:19 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/comment-page-1/#comment-19059</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Mon, 18 May 2009 15:20:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/#comment-19059</guid>
		<description>@David REI: you&#039;re right! Thanks for pointing it out.</description>
		<content:encoded><![CDATA[<p>@David REI: you&#039;re right! Thanks for pointing it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David REI</title>
		<link>http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/comment-page-1/#comment-19057</link>
		<dc:creator>David REI</dc:creator>
		<pubDate>Mon, 18 May 2009 14:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/#comment-19057</guid>
		<description>Hi ! 
Just a little comment in order to tell you it\&#039;s SPUrlUtility.CombineUrl in spite of SPUrlUtility.Combine :)

Have a nice day !</description>
		<content:encoded><![CDATA[<p>Hi !<br />
Just a little comment in order to tell you it\&#039;s SPUrlUtility.CombineUrl in spite of SPUrlUtility.Combine <img src='http://blog.mastykarz.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Have a nice day !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaap Vossers</title>
		<link>http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/comment-page-1/#comment-14425</link>
		<dc:creator>Jaap Vossers</dc:creator>
		<pubDate>Thu, 26 Mar 2009 11:54:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/#comment-14425</guid>
		<description>If I am correct, the following approach should work to access the page layout of the publishing page you are requesting:

PublishingPage.GetPublishingPage(SPContext.Current.ListItem).Layout</description>
		<content:encoded><![CDATA[<p>If I am correct, the following approach should work to access the page layout of the publishing page you are requesting:</p>
<p>PublishingPage.GetPublishingPage(SPContext.Current.ListItem).Layout</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/comment-page-1/#comment-13815</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Mon, 16 Mar 2009 15:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/#comment-13815</guid>
		<description>@Jeremy Thake: I need to render some extra HTML markup conditionally depending on the Page Layout of the current page. The control that checks it is in the Master Page. I&#039;m not sure I&#039;d be able to get the Page Layout of the current page using SPQuery. Additionally, I don&#039;t think that the performance would be better than just reading the properties through the object model.

@Keith Dahlby: Thanks for the tip :D I hope I&#039;ll have some time to test this out</description>
		<content:encoded><![CDATA[<p>@Jeremy Thake: I need to render some extra HTML markup conditionally depending on the Page Layout of the current page. The control that checks it is in the Master Page. I&#039;m not sure I&#039;d be able to get the Page Layout of the current page using SPQuery. Additionally, I don&#039;t think that the performance would be better than just reading the properties through the object model.</p>
<p>@Keith Dahlby: Thanks for the tip <img src='http://blog.mastykarz.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  I hope I&#039;ll have some time to test this out</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Dahlby</title>
		<link>http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/comment-page-1/#comment-13808</link>
		<dc:creator>Keith Dahlby</dc:creator>
		<pubDate>Mon, 16 Mar 2009 13:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/#comment-13808</guid>
		<description>Other options:
1) Create a &lt;code&gt;System.Uri&lt;/code&gt; and use its &lt;code&gt;AbsolutePath&lt;/code&gt; property.
2) &lt;code&gt;web.GetFile(absoluteUrl)&lt;/code&gt; works (assuming &lt;code&gt;absoluteUrl&lt;/code&gt; is under &lt;code&gt;web&lt;/code&gt;):

&lt;code&gt;public static SPListItem SaferGetListItem(this SPWeb web, string absoluteUrl)
{
&#160;&#160;return web.GetFile(absoluteUrl).Item as SPListItem.
}&lt;/code&gt;

I&#039;m not sure if there&#039;s a performance difference between GetFile and GetListItem.

Cheers ~
Keith</description>
		<content:encoded><![CDATA[<p>Other options:<br />
1) Create a <code>System.Uri</code> and use its <code>AbsolutePath</code> property.<br />
2) <code>web.GetFile(absoluteUrl)</code> works (assuming <code>absoluteUrl</code> is under <code>web</code>):</p>
<p><code>public static SPListItem SaferGetListItem(this SPWeb web, string absoluteUrl)<br />
{<br />
&nbsp;&nbsp;return web.GetFile(absoluteUrl).Item as SPListItem.<br />
}</code></p>
<p>I&#039;m not sure if there&#039;s a performance difference between GetFile and GetListItem.</p>
<p>Cheers ~<br />
Keith</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Thake</title>
		<link>http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/comment-page-1/#comment-13807</link>
		<dc:creator>Jeremy Thake</dc:creator>
		<pubDate>Mon, 16 Mar 2009 13:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/inconvenient-spweb-getlistitem-exception-hresult-0x80070001/#comment-13807</guid>
		<description>Interesting one to catch man! So how come you are accessing the SPListItem directly using this method and not via SPQuery or something?
If you&#039;ve got time, be great to get this added as yet another way to get SPListItem from a site ;-)
http://sharepointdevwiki.com/display/public/SharePoint+Lists</description>
		<content:encoded><![CDATA[<p>Interesting one to catch man! So how come you are accessing the SPListItem directly using this method and not via SPQuery or something?<br />
If you&#039;ve got time, be great to get this added as yet another way to get SPListItem from a site <img src='http://blog.mastykarz.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
<a href="http://sharepointdevwiki.com/display/public/SharePoint+Lists" rel="nofollow">http://sharepointdevwiki.com/display/public/SharePoint+Lists</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
