<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Yann GARIT - Technologies Microsoft &#38; Co</title>
	<atom:link href="http://yanngarit.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://yanngarit.wordpress.com</link>
	<description>Technologies Microsoft &#38; Co</description>
	<lastBuildDate>Wed, 09 Nov 2011 10:26:03 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='yanngarit.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Yann GARIT - Technologies Microsoft &#38; Co</title>
		<link>http://yanngarit.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://yanngarit.wordpress.com/osd.xml" title="Yann GARIT - Technologies Microsoft &#38; Co" />
	<atom:link rel='hub' href='http://yanngarit.wordpress.com/?pushpress=hub'/>
		<item>
		<title>[SharePoint 2010] Probl&#232;me lors d&#8217;un second postback dans une WebPart avec un UpdatePanel ou une SPGridView</title>
		<link>http://yanngarit.wordpress.com/2011/08/29/sharepoint-2010-problme-lors-dun-second-postback-dans-une-webpart-avec-un-updatepanel-ou-une-spgridview/</link>
		<comments>http://yanngarit.wordpress.com/2011/08/29/sharepoint-2010-problme-lors-dun-second-postback-dans-une-webpart-avec-un-updatepanel-ou-une-spgridview/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 13:45:00 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[WebPart; UpdatePanel; SPGridView; FormOnSubmitWrapper; second postback submit]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/2011/08/29/sharepoint-2010-problme-lors-dun-second-postback-dans-une-webpart-avec-un-updatepanel-ou-une-spgridview/</guid>
		<description><![CDATA[Vous l’avez peut-être remarqué mais, lorsque vous ajoutez un bouton dans un UpdatePanel ou encore dans une SPGridView (qui utilise également ce mécanisme pour afficher les données), l’action du bouton ne fonctionne que la première fois. Il vous faut recharger complètement la page pour pouvoir le refaire marcher. Après plusieurs recherches, j’ai pu trouver une [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=433&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Vous l’avez peut-être remarqué mais, lorsque vous ajoutez un bouton dans un UpdatePanel ou encore dans une SPGridView (qui utilise également ce mécanisme pour afficher les données), l’action du bouton ne fonctionne que la première fois. Il vous faut recharger complètement la page pour pouvoir le refaire marcher.</p>
<p>Après plusieurs recherches, j’ai pu trouver une explication assez vague : <em>Le service JavaScript de SharePoint override l’action par defaut du formulaire afin de pouvoir gérer certains types d’URL, qui peuvent contenir des caractères sur deux octets, pour des scénarios de rappels asynchrones.</em></p>
<p>La solution est donc de désactiver cette solution par le biais d’un script simple :</p>
<blockquote><pre class="csharpcode">&lt;script type=<span class="str">&quot;text/javascript&quot;</span>&gt;
    _spOriginalFormAction = document.forms[0].action;
    _spSuppressFormOnSubmitWrapper = <span class="kwrd">true</span>;
&lt;/script&gt;</pre>
</blockquote>
<p>Ce qui résoudra votre problème de second postback.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/433/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=433&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2011/08/29/sharepoint-2010-problme-lors-dun-second-postback-dans-une-webpart-avec-un-updatepanel-ou-une-spgridview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>
	</item>
		<item>
		<title>[SharePoint 2010] D&#233;sactiver la restriction du Client Object Model (ECMAScript) pour les utilisateurs anonymes</title>
		<link>http://yanngarit.wordpress.com/2011/08/24/sharepoint-2010-dsactiver-la-restriction-du-client-object-model-ecmascript-pour-les-utilisateurs-anonymes/</link>
		<comments>http://yanngarit.wordpress.com/2011/08/24/sharepoint-2010-dsactiver-la-restriction-du-client-object-model-ecmascript-pour-les-utilisateurs-anonymes/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 13:19:08 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Technologies Microsoft]]></category>
		<category><![CDATA[SharePoint 2010; GetItems; SPClientCallableSettings; AnonymousRestrictedTypes; SPClientCallableSettings.AnonymousRestrictedTypes; ECMAScript; Client Object Model]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/2011/08/24/sharepoint-2010-dsactiver-la-restriction-du-client-object-model-ecmascript-pour-les-utilisateurs-anonymes/</guid>
		<description><![CDATA[L’utilisation du modèle objet client de SharePoint 2010 permet de facilement récupérer des données, cependant, vous avez peut-être remarqué que son utilisation en mode anonyme ne fonctionne pas. Vous obtiendrez en effet un message d’erreur comme quoi la méthode “GetItems” a été désactivé par l’administrateur : &#34;ErrorMessage&#34;:&#34;The method \&#34;GetItems\&#34; of the type \&#34;List\&#34; with id [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=430&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>L’utilisation du modèle objet client de SharePoint 2010 permet de facilement récupérer des données, cependant, vous avez peut-être remarqué que son utilisation en mode anonyme ne fonctionne pas.    <br />Vous obtiendrez en effet un message d’erreur comme quoi la méthode “GetItems” a été désactivé par l’administrateur :</p>
<p><strong><em>&quot;ErrorMessage&quot;:&quot;The method \&quot;GetItems\&quot; of the type \&quot;List\&quot; with id \&quot;{xxxxxxx-xxxxxxx-xxx-xxx}\&quot; is blocked by the administrator on the server.&quot;</em></strong></p>
<p>Pour désactiver cette restriction, il faut aller voir du coté de <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spclientcallablesettings.anonymousrestrictedtypes(office.14).aspx">SPClientCallableSettings.AnonymousRestrictedTypes</a>. </p>
<p>Cette propriété référence toutes les méthodes qui sont restreintes dans le cas d’un accès par un utilisateur anonyme.</p>
<p><a href="http://yanngarit.files.wordpress.com/2011/08/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://yanngarit.files.wordpress.com/2011/08/image_thumb.png?w=900&#038;h=415" width="900" height="415" /></a></p>
<p>Nous pouvons voir, en y accédant en PowerShell, que la méthode “GetItems” est bien présente dans les méthodes restreintes.</p>
<p>&#160;</p>
<p><span id="more-430"></span>
<p>Afin de permettre la récupération des éléments d’un liste avec les utilisateurs anonymes, vous pouvez appeler ce code dans un script PowerShell :</p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#039;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> $wa = <span style="color:#0000ff;">Get</span>-SPWebApplication -<span style="color:#0000ff;">Identity</span> $WebAppName</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span> $wa.ClientCallableSettings.AnonymousRestrictedTypes.Remove([Microsoft.SharePoint.SPList], &quot;GetItems&quot;) </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span> $wa.<span style="color:#0000ff;">Update</span>()</pre>
<p><!--CRLF--></div>
</div>
<p>Et voilà, vous pouvez maintenant y accéder sans problème..</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/430/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=430&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2011/08/24/sharepoint-2010-dsactiver-la-restriction-du-client-object-model-ecmascript-pour-les-utilisateurs-anonymes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>

		<media:content url="http://yanngarit.files.wordpress.com/2011/08/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>[SharePoint 2010] Extension de SPMetal</title>
		<link>http://yanngarit.wordpress.com/2011/01/29/sharepoint-2010-extension-de-spmetal/</link>
		<comments>http://yanngarit.wordpress.com/2011/01/29/sharepoint-2010-extension-de-spmetal/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 09:00:00 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Technologies Microsoft]]></category>
		<category><![CDATA[Linq to SharePoint 2010; SPMetal; Extending SPMetal; Extension SPMetal; FielType; SPAttachmentCollection; ICustomMapping; Custom Mapping]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/2011/01/29/sharepoint-2010-extension-de-spmetal/</guid>
		<description><![CDATA[Comme vu dans mes articles précédents, il y a certains types de colonnes qui ne sont pas prises en charge lors de la génération du SPMetal, je vous ai déjà montré : ImageFieldValue TaxonomyFieldValue &#38; TaxonomyFieldValueCollection HtmlField Ces méthodes, à rajouter dans votre fichier généré sont très utiles et faciles à instancier. Cependant, dans le [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=427&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Comme vu dans mes articles précédents, il y a certains types de colonnes qui ne sont pas prises en charge lors de la génération du SPMetal, je vous ai déjà montré :</p>
<ul>
<li><a href="http://yanngarit.wordpress.com/2011/01/19/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-image" target="_blank">ImageFieldValue</a></li>
<li><a href="http://yanngarit.wordpress.com/2011/01/22/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-taxonomy" target="_blank">TaxonomyFieldValue &amp; TaxonomyFieldValueCollection</a></li>
<li><a href="http://yanngarit.wordpress.com/2011/01/26/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-html" target="_blank">HtmlField</a></li>
</ul>
<p>Ces méthodes, à rajouter dans votre fichier généré sont très utiles et faciles à instancier. </p>
<p>Cependant, dans le cas où vous devez rajouter plusieurs fois des listes ou des types de contenu. A chaque regénération, vous devez remettre ces méthodes au bon endroit dans la classe, et je peux vous dire, pour l’avoir fait, que ça prend pas mal de temps et que c’est très répétitif !</p>
<p>Une solution efficace et d’utiliser le <strong>Custom Mapping</strong>. Il va nous permettre, pour n’importe qu’elle liste ou type de contenu, de rajouter les fonctions nécessaires pour récupérer ce type de colonnes, et cela, une seule et unique fois.</p>
<p>Pour l’exemple, je vais vous montrer un dernier type non pris en charge, qui est:&#160; Type fichiers attachés. En mode Custom Mapping bien sûr. </p>
<p>Il s’agit des <strong><font color="#4bacc6">SPAttachmentCollection</font></strong> de l’assembly Microsoft.SharePoint.</p>
<p>Il s’agit donc ici d’étendre la classe généré par SPMetal et de rajouter nos propres champs en plus, pour cela, la classe custom mapping prévoit 3 fonctions : <strong>MapTo</strong>, <strong>MapFrom</strong> et <strong>Resolve</strong>. </p>
<ul>
<li><strong>MapFrom</strong> pour la lecture (<font color="#ff0000">READ</font>). =&gt; GET</li>
<li><strong>MapTo</strong> pour l’écriture (<font color="#ff0000">WRITE</font>). =&gt; SET</li>
<li><strong>Resolve</strong> pour la mise à jour (<font color="#ff0000">UPDATE</font>).</li>
</ul>
<pre class="code"><span style="color:blue;">public partial class </span><span style="color:#2b91af;">Contact </span>: Item, <font color="#4bacc6">ICustomMapping</font>
{
    <span style="color:blue;">private const string </span>CONTENT_FIELD = <span style="color:#a31515;">&quot;Attachments&quot;</span>;
    <span style="color:blue;">private </span><font color="#4bacc6">SPAttachmentCollection</font> _contentAttachments;
    <span style="color:blue;">public </span><font color="#4bacc6">SPAttachmentCollection</font> ContentAttachments
    {
    }

    [<font color="#4bacc6">CustomMapping</font>(Columns = <span style="color:blue;">new string</span>[] { CONTENT_FIELD})]
    <span style="color:blue;">public void </span>MapFrom(<span style="color:blue;">object </span>listItem)
    {
    }

    <span style="color:blue;">public void </span>MapTo(<span style="color:blue;">object </span>listItem)
    {
    }

    <span style="color:blue;">public void </span>Resolve(RefreshMode mode, <span style="color:blue;">object </span>originalListItem, <span style="color:blue;">object </span>databaseListItem)
    {
    }
}</pre>
<p><span id="more-427"></span>
<p>Comme les différents types précédents, on commence par instancier l’entité <font color="#4bacc6">SPAttachmentCollection.</font></p>
<pre class="code"><span style="color:blue;">private </span><font color="#4bacc6">SPAttachmentCollection</font> _contentAttachments;
       <span style="color:blue;">public </span><font color="#4bacc6">SPAttachmentCollection</font> ContentAttachments
       {
           <span style="color:blue;">get </span>{ <span style="color:blue;">return </span>_contentAttachments;}
           <span style="color:blue;">set
           </span>{
               <span style="color:blue;">if </span>(<span style="color:blue;">value </span>!= _contentAttachments)
               {
                   <span style="color:blue;">this</span>.OnPropertyChanging(CONTENT_FIELD, _contentAttachments);
                   _contentAttachments = <span style="color:blue;">value</span>;
                   <span style="color:blue;">this</span>.OnPropertyChanged(CONTENT_FIELD);
               }
           }
       }</pre>
<p>On nomme la variable CONTENT_FIELD du nom de la colonne en question.</p>
<p><u>Passons à la fonction de lecture: </u></p>
<pre class="code">[CustomMapping(Columns = <span style="color:blue;">new string</span>[] { CONTENT_FIELD})]
<span style="color:blue;">public void </span>MapFrom(<span style="color:blue;">object </span>listItem)
{
           <font color="#4bacc6">SPListItem</font> item = (<font color="#4bacc6">SPListItem</font>) listItem;
           <span style="color:blue;">if</span>((<span style="color:blue;">bool</span>)item[CONTENT_FIELD] != <span style="color:blue;">false</span>)
           {
               <span style="color:blue;">this</span>.ContentAttachments = (<font color="#4bacc6">SPAttachmentCollection</font>) item.Attachments;
           }
}</pre>
<p>Cette fonction va simplement vérifier qu’un champ du nom en question existe puis le caster au bon format.</p>
<p><u>Fonction d’écriture :</u></p>
<pre class="code"><span style="color:blue;">public void </span>MapTo(<span style="color:blue;">object </span>listItem)
{
            <font color="#4bacc6">SPListItem</font> item = listItem <span style="color:blue;">as </span><font color="#4bacc6">SPListItem</font>;
            <span style="color:blue;">if</span>(<span style="color:blue;">this</span>.ContentAttachments != <span style="color:blue;">null</span>)
            {
                item[CONTENT_FIELD] = ContentAttachments;
            }
}</pre>
<p>Il s’agit du setter, on va donc écrire la valeur de fichiers dans le bon champ de colonne</p>
<p><u>Fonction de mise à jour :</u></p>
<p>Il y a plusieurs type d’update à prendre en compte, en fonction de ce que l’on choisit :</p>
<ul>
<li>KeepCurrentValues<br />
    <br />Force la méthode <a href="http://msdn.microsoft.com/fr-fr/library/system.data.linq.datacontext.refresh.aspx">Refresh</a> à permuter les valeurs d&#8217;origine avec les valeurs récupérées. Aucune valeur actuelle n&#8217;est modifiée.</li>
<li>KeepChanges<br />
    <br />Force la méthode <a href="http://msdn.microsoft.com/fr-fr/library/system.data.linq.datacontext.refresh.aspx">Refresh</a> à conserver la valeur actuelle qui a été modifiée, mais met à jour les autres valeurs.</li>
<li>OverwriteCurrentValues<br />
    <br />Force la méthode <a href="http://msdn.microsoft.com/fr-fr/library/system.data.linq.datacontext.refresh.aspx">Refresh</a> à substituer toutes les valeurs actuelles par les valeurs de la base de données.</li>
</ul>
<pre class="code"><span style="color:blue;">public void </span>Resolve(RefreshMode mode, <span style="color:blue;">object </span>originalListItem, <span style="color:blue;">object </span>databaseListItem)
 {
     <font color="#4bacc6">SPListItem</font> originalItem = originalListItem <span style="color:blue;">as </span><font color="#4bacc6">SPListItem</font> ;
     <font color="#4bacc6">SPListItem</font> databaseItem = databaseListItem <span style="color:blue;">as </span><font color="#4bacc6">SPListItem</font> ;

     <font color="#4bacc6">SPAttachmentCollection</font> originalValue = originalListItem[CONTENT_FIELD] <span style="color:blue;">as </span><font color="#4bacc6">SPAttachmentCollection</font> ;
     <font color="#4bacc6">SPAttachmentCollection</font> databaseValue = databaseItem[CONTENT_FIELD] <span style="color:blue;">as </span><font color="#4bacc6">SPAttachmentCollection</font> ;

     <span style="color:blue;">switch </span>(mode)
     {
         <span style="color:blue;">case </span><font color="#9bbb59">RefreshMode</font>.OverwriteCurrentValues:
             <span style="color:blue;">this</span>.ContentAttachments = databaseValue;
             <span style="color:blue;">break</span>;
         <span style="color:blue;">case </span><font color="#9bbb59">RefreshMode</font>.KeepCurrentValues:
             databaseItem[CONTENT_FIELD] = <span style="color:blue;">this</span>.ContentAttachments;
             <span style="color:blue;">break</span>;
         <span style="color:blue;">case </span><font color="#9bbb59">RefreshMode</font>.KeepChanges:
             <span style="color:blue;">if </span>(<span style="color:blue;">this</span>.ContentAttachments != originalValue)
                 databaseItem[CONTENT_FIELD] = <span style="color:blue;">this</span>.ContentAttachments;
             <span style="color:blue;">else if </span>(<span style="color:blue;">this</span>.ContentAttachments == originalValue &amp;&amp; <span style="color:blue;">this</span>.ContentAttachments != databaseValue)
                 <span style="color:blue;">this</span>.ContentAttachments = databaseValue;
             <span style="color:blue;">break</span>;
     }
 }</pre>
<p>Et voilà, vous gérez chaque fonctions possible, ce qui vous donne pour l’utilisation avec Linq :</p>
<pre class="code"><a href="http://yanngarit.files.wordpress.com/2011/01/image.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://yanngarit.files.wordpress.com/2011/01/image_thumb.png?w=575&#038;h=216" width="575" height="216" /></a></pre>
<p>Vous avez alors accès aux fichiers attachés directement, ici pour la lecture puisque l’objet “item” correspond à la liste “contact” à laquelle nous avons ajouté des fichiers sans rien avoir à faire de plus, les méthodes “mapTo,mapFrom et resolve” se font automatiquement lors de l’appel de la classe généré par SPMetal.</p>
<p>Il faut bien comprendre par cette méthode qu’il faut prendre les listes/types de contenu <strong>UNE par UNE</strong> afin de rajouter les champs nécessaires, c’est mieux que de les rajouter directement dans le fichier généré puisque par cette méthode, nous le faisons qu’une seule fois.</p>
<p>A vous de choisir votre meilleur solution maintenant.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/427/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=427&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2011/01/29/sharepoint-2010-extension-de-spmetal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>

		<media:content url="http://yanngarit.files.wordpress.com/2011/01/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>[SharePoint 2010] Corriger les limites de SPMetal : FieldType: HTML</title>
		<link>http://yanngarit.wordpress.com/2011/01/26/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-html/</link>
		<comments>http://yanngarit.wordpress.com/2011/01/26/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-html/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 11:00:00 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Technologies Microsoft]]></category>
		<category><![CDATA[HtmlField; Linq To SharePoint 2010; SPMetal; FieldType Invali; FieldType Html]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/2011/01/26/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-html/</guid>
		<description><![CDATA[Encore un champ non pris en compte par le SPMetal, c’est le type HTML. Utilisé par les RichTextBox ,il faut pouvoir récupérer les valeurs, les couleurs/polices/images que l’on peut avoir dans ce type de champ. Comme pour les champs taxonomiques, et les images, il faut juste utiliser une classe spécifique: Microsoft.SharePoint.Publishing.Fields.HtmlFiel dans votre fichier généré [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=424&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Encore un champ non pris en compte par le SPMetal, c’est le type HTML.</p>
<p>Utilisé par les RichTextBox ,il faut pouvoir récupérer les valeurs, les couleurs/polices/images que l’on peut avoir dans ce type de champ.</p>
<p>Comme pour les champs taxonomiques, et les images, il faut juste utiliser une classe spécifique: <font color="#000000"><strong>Microsoft.SharePoint.Publishing.Fields.</strong></font><font color="#4bacc6">HtmlFiel </font><font color="#000000">dans votre fichier généré par SPMetal.</font></p>
<pre class="code">[Microsoft.SharePoint.Linq.ColumnAttribute(Name=<span style="color:#a31515;">&quot;col_PublishingHtml&quot;</span>, Storage=<span style="color:#a31515;">&quot;_publishinghtml&quot;</span>, FieldType=<span style="color:#a31515;">&quot;Html&quot;</span>)]
<span style="color:blue;">public <font color="#000000">Microsoft.SharePoint.Publishing.Fields.</font><font color="#4bacc6">HtmlField </font></span>PublishingHtml {
       <span style="color:blue;">get </span>{
        <span style="color:blue;">return this</span>._publishinghtml;
       }
       <span style="color:blue;">set </span>{
          <span style="color:blue;">if </span>((<span style="color:blue;">value </span>!= <span style="color:blue;">this</span>._publishinghtml)) {
             <span style="color:blue;">this</span>.OnPropertyChanging(<span style="color:#a31515;">&quot;PublishingHtml&quot;</span>, <span style="color:blue;">this</span>._publishinghtml);
             <span style="color:blue;">this</span>._publishinghtml= <span style="color:blue;">value</span>;
             <span style="color:blue;">this</span>.OnPropertyChanged(<span style="color:#a31515;">&quot;PublishingHtml&quot;</span>);
          }
        }
}</pre>
<pre class="code">Et voilà, vous pouvez utiliser ce type de colonne sans problèmes.</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/424/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/424/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/424/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=424&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2011/01/26/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>
	</item>
		<item>
		<title>[SharePoint 2010] Corriger les limites de SPMetal : FieldType: Taxonomy</title>
		<link>http://yanngarit.wordpress.com/2011/01/22/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-taxonomy/</link>
		<comments>http://yanngarit.wordpress.com/2011/01/22/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-taxonomy/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 13:53:00 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Technologies Microsoft]]></category>
		<category><![CDATA[TaxonomyFieldValue; TaxonomyFieldValueCollection; Linq to SharePoint 2010; SPMetal; FieldType Managed Metadata; FieldType Invalid]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/2011/01/22/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-taxonomy/</guid>
		<description><![CDATA[Passons maintenant au type de champ taxonomique. Leur génération n’est pas non plus prise en compte par le SPMetal et demande une petite réflexion supplémentaire contrairement au type image par exemple. En effet, les champs de ce type peuvent être multi-values. Leur résolution est donc différente. La dessus, même en forçant la génération de la [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=423&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Passons maintenant au type de champ taxonomique. Leur génération n’est pas non plus prise en compte par le SPMetal et demande une petite réflexion supplémentaire contrairement au type image par exemple. </p>
<p>En effet, les champs de ce type peuvent être multi-values. Leur résolution est donc différente.</p>
<p>La dessus, même en forçant la génération de la colonne dans le fichier XML pour paramétrer SPMetal, ça ne vous aidera pas.</p>
<p>Il faut donc utiliser l’assembly : <strong>Microsoft.SharePoint.Taxonomy.<font color="#4bacc6">TaxonomyFieldValue</font></strong> pour les champs taxonomiques simple et <strong>Microsoft.SharePoint.Taxonomy.<font color="#4bacc6">TaxonomyFieldValueCollection</font></strong> pour les multi-values qui n’est autre qu’une <font color="#4bacc6">List&lt;TaxonomyFieldValue&gt;.</font></p>
<p><font color="#000000">Ces classes permettent de récupérer le label, donc le texte, le “termGuid” pour le Guid du term, la “validatedString” qui est une représentation dite sérialisée de l’objet taxonomique ainsi que le WssId nécessaire pour le lookup de champs, pour plus d’information: </font><a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.taxonomy.taxonomyfieldvalue_members.aspx"><font color="#000000">ici</font></a><font color="#000000">.</font></p>
<p><u>Ainsi si le champ est simple :</u></p>
<pre class="code">[Microsoft.SharePoint.Linq.ColumnAttribute(Name=<span style="color:#a31515;">"col_Keyword"</span>, Storage=<span style="color:#a31515;">"_keyword"</span>, FieldType=<span style="color:#a31515;">"Taxonomy"</span>)]
<span style="color:blue;">public <font color="#4bacc6">TaxonomyFieldValue</font> </span>Keyword {
       <span style="color:blue;">get </span>{
          <span style="color:blue;">return this</span>._keyword;
       }
       <span style="color:blue;">set </span>{
          <span style="color:blue;">if </span>((<span style="color:blue;">value </span>!= <span style="color:blue;">this</span>._keyword)) {
             <span style="color:blue;">this</span>.OnPropertyChanging(<span style="color:#a31515;">"Keyword "</span>, <span style="color:blue;">this</span>._keyword);
             <span style="color:blue;">this</span>._keyword= <span style="color:blue;">value</span>;
             <span style="color:blue;">this</span>.OnPropertyChanged(<span style="color:#a31515;">"Keyword"</span>);
          }
       }
}
</pre>
<p><u>Pour les multi-values:</u></p>
<pre class="code">[Microsoft.SharePoint.Linq.ColumnAttribute(Name=<span style="color:#a31515;">"col_Keywords"</span>, Storage=<span style="color:#a31515;">"_keywords"</span>, FieldType=<span style="color:#a31515;">"Taxonomy"</span>)]
<span style="color:blue;">public <font color="#4bacc6">TaxonomyFieldValueCollection</font> </span>Keywords{
       <span style="color:blue;">get </span>{
           <span style="color:blue;">return this</span>._keywords;
       }
       <span style="color:blue;">set </span>{
           <span style="color:blue;">if </span>((<span style="color:blue;">value </span>!= <span style="color:blue;">this</span>._keywords)) {
              <span style="color:blue;">this</span>.OnPropertyChanging(<span style="color:#a31515;">"Keywords"</span>, <span style="color:blue;">this</span>._keywords);
              <span style="color:blue;">this</span>._keywords= <span style="color:blue;">value</span>;
              <span style="color:blue;">this</span>.OnPropertyChanged(<span style="color:#a31515;">"Keywords"</span>);
           }
       }
}
</pre>
<p>Bien sûr, avec ce type de classe, ne pas oublier de faire une petite boucle pour afficher vos labels avec un “;” entre chaque <font color="#4bacc6">TaxonomyFieldValue</font> par exemple.</p>
<p>Et voilà, encore un type de champ complété.</p>
<pre class="code">&nbsp;</pre>
<p><font color="#4bacc6"></font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/423/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/423/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/423/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=423&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2011/01/22/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-taxonomy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>
	</item>
		<item>
		<title>[SharePoint 2010] Corriger les limites de SPMetal : FieldType: Image</title>
		<link>http://yanngarit.wordpress.com/2011/01/19/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-image/</link>
		<comments>http://yanngarit.wordpress.com/2011/01/19/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-image/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 12:21:00 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Technologies Microsoft]]></category>
		<category><![CDATA[ImageFieldValue; Linq to sharepoint 2010; SPMetal; FieldType Invalid; FieldType Image]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/2011/01/19/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-image/</guid>
		<description><![CDATA[Comme nous avons pu le voir dans l’article précédent, certains types de colonnes ne sont pas pris en compte lors de la génération de SPMetal, nous allons voir ici comment corriger les problèmes pour un type bien précis: Image. Pour cela, rien de plus simple, une fois que vous avez repéré quels sont vos champs [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=421&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Comme nous avons pu le voir dans l’article précédent, certains types de colonnes ne sont pas pris en compte lors de la génération de SPMetal, nous allons voir ici comment corriger les problèmes pour un type bien précis: Image.</p>
<p>Pour cela, rien de plus simple, une fois que vous avez repéré quels sont vos champs qui ne passeront pas, il suffit de compléter le fichier SPMetal généré.</p>
<p>Les champs de ce type dans SharePoint permettent d’avoir accès à différents attributs, ce n’est donc pas une simple URL de type string qui est stocké.</p>
<p>Pour l’instancier, il faut donc utiliser :  Microsoft.SharePoint.Publishing.Fields.<span style="color:#4bacc6;">ImageFieldValue</span>, vous pouvez retrouver les propriétés sur msdn <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.fields.imagefieldvalue_members.aspx">ici</a>.</p>
<p>Il reste maintenant à remplacer:</p>
<pre class="code">[Microsoft.SharePoint.Linq.ColumnAttribute(Name=<span style="color:#a31515;">"col_Thumbnail"</span>, Storage=<span style="color:#a31515;">"_thumbnail"</span>, FieldType=<span style="color:#a31515;">"Invalid"</span>)]
<span style="color:blue;">public virtual object </span>Thumbnail {
   <span style="color:blue;">get </span>{
     <span style="color:blue;">return this</span>._thumbnail;
   }
   <span style="color:blue;">set </span>{
     <span style="color:blue;">if </span>((<span style="color:blue;">value </span>!= <span style="color:blue;">this</span>._thumbnail)) {
         <span style="color:blue;">this</span>.OnPropertyChanging(<span style="color:#a31515;">"Thumbnail"</span>, <span style="color:blue;">this</span>._thumbnail);
         <span style="color:blue;">this</span>._thumbnail = <span style="color:blue;">value</span>;
         <span style="color:blue;">this</span>.OnPropertyChanged(<span style="color:#a31515;">"Thumbnail"</span>);
     }
  }
}</pre>
<p><span style="font-family:Lucida Sans Unicode;">Qui devient :</span></p>
<pre class="code">[Microsoft.SharePoint.Linq.ColumnAttribute(Name=<span style="color:#a31515;">"col_Thumbnail"</span>, Storage=<span style="color:#a31515;">"_thumbnail"</span>, FieldType=<span style="color:#a31515;">"<span style="font-size:medium;">Image</span>"</span>)]
<span style="color:blue;">public <span style="color:#000000;">Microsoft.SharePoint.Publishing.Fields.</span><span style="color:#4bacc6;"><span style="font-size:medium;">ImageFieldValue</span> </span></span>Thumbnail {
   <span style="color:blue;">get </span>{
     <span style="color:blue;">return this</span>._thumbnail;
   }
   <span style="color:blue;">set </span>{
     <span style="color:blue;">if </span>((<span style="color:blue;">value </span>!= <span style="color:blue;">this</span>._thumbnail)) {
         <span style="color:blue;">this</span>.OnPropertyChanging(<span style="color:#a31515;">"Thumbnail"</span>, <span style="color:blue;">this</span>._thumbnail);
         <span style="color:blue;">this</span>._thumbnail = <span style="color:blue;">value</span>;
         <span style="color:blue;">this</span>.OnPropertyChanged(<span style="color:#a31515;">"Thumbnail"</span>);
     }
   }
}</pre>
<p><span style="font-family:Lucida Sans Unicode;">Sans oublier de remplacer : </span></p>
<p><span style="font-family:Lucida Sans Unicode;"><span style="text-decoration:line-through;"><span style="color:#0000ff;">private object</span> Thumbnail</span>   (situé en haut de la classe)  par:</span></p>
<p><span style="font-family:Lucida Sans Unicode;"><span style="color:#0000ff;">private</span> Microsoft.SharePoint.Publishing.Fields.<span style="color:#4bacc6;">ImageFieldValue</span> Thumbnail.</span></p>
<p><span style="font-family:Lucida Sans Unicode;">Et le tour est joué, vous aurez alors accès à toutes les propriétés du champ (l’url bien sûr, le texte alternatif, hyperlien, la description…).</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=421&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2011/01/19/sharepoint-2010-corriger-les-limites-de-spmetal-fieldtype-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>
	</item>
		<item>
		<title>[SharePoint 2010] Rep&#233;rer les limites de la g&#233;n&#233;ration SPMetal</title>
		<link>http://yanngarit.wordpress.com/2011/01/16/sharepoint-2010-reprer-les-limites-de-la-gnration-spmetal/</link>
		<comments>http://yanngarit.wordpress.com/2011/01/16/sharepoint-2010-reprer-les-limites-de-la-gnration-spmetal/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 12:00:00 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Technologies Microsoft]]></category>
		<category><![CDATA[SPMetal; Linq to SharePoint 2010; Invalid FieldType]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/?p=417</guid>
		<description><![CDATA[Vous utilisez la génération SPMetal pour faire du Linq to SharePoint, afin de récupérer facilement le CRUD de n’importe qu’elle type de contenu (content type) ou liste de votre collection de sites SharePoint. C’est un gain de temps considérable, très facile à mettre en place pour générer les entités. Cependant, vous vous rendrez très vite [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=417&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Vous utilisez la génération SPMetal pour faire du Linq to SharePoint, afin de récupérer facilement le CRUD de n’importe qu’elle type de contenu (content type) ou liste de votre collection de sites SharePoint.</p>
<p>C’est un gain de temps considérable, très facile à mettre en place pour générer les entités.</p>
<p>Cependant, vous vous rendrez très vite compte qu’en cas d’utilisation plus avancées, qu’il y a certaines limites à l’utilisation de cette méthode.</p>
<p>En effet,&#160; si vous avez des colonnes avec des images, des métadonnées ou encore des champs html, ils seront complètement absents de votre fichier généré.</p>
<p>Le but de cet article est de vous montrer comment repérer les colonnes qui ne passeront pas lors de la génération.</p>
<p>Il y a certaines commandes SPMetal que nous pouvons spécifier dans un fichier XML, c’est ce fichier qui permet d’interagir sur la création des classes. Une de ses particularités est de pouvoir spécifier une “Column element”, c’est à dire de pouvoir forcer la génération d’une colonne de liste ou de type de contenu même si elles seraient invisibles lors d’une génération normale. La génération est telle que si certaines colonnes ne sont pas prises en compte, la génération les supprimes directement du fichier. </p>
<p>Voici un exemple pour forcer une colonne de type <font color="#0000ff">ImageFieldValue</font>, qui n’est pas pris en compte lors d’une génération classique. </p>
<p><font size="3"><font face="Courier New"><span style="color:blue;">&lt;?</span><span style="color:maroon;">xml </span><span style="color:red;">version</span><span style="color:blue;">=&quot;1.0&quot; </span><span style="color:red;">encoding</span><span style="color:blue;">=&quot;utf-8&quot;</span><span style="color:black;">?</span></font></font><font size="3"><font face="Courier New"><span style="color:blue;">&gt;         <br />&lt;</span><span style="color:maroon;">Web </span><span style="color:red;">xmlns</span></font></font><font size="3"><font face="Courier New"><span style="color:blue;">=&quot;http://schemas.microsoft.com/SharePoint/2010/spmetal&quot;&gt;         <br />&lt;</span><span style="color:maroon;">ContentType </span><span style="color:red;">Name</span></font></font><font size="3"><font face="Courier New"><span style="color:blue;">=&quot;Contact&quot;&gt;         <br />&lt;</span><span style="color:maroon;">Column </span><span style="color:red;">Name</span></font></font><font size="3"><font face="Courier New"><span style="color:blue;">=&quot;col_Thumbnail&quot; /&gt;         <br /></span><span style="color:blue;">&lt;/</span><span style="color:maroon;">ContentType</span><span style="color:blue;">&gt;&lt;/</span><span style="color:maroon;">Web</span></font></font><font size="3"><font face="Courier New"><span style="color:blue;">&gt;         <br /></span><span style="color:blue;"></span></font></font></p>
<p>Et le résultat ainsi obtenu :</p>
<pre class="code">[Microsoft.SharePoint.Linq.ColumnAttribute(Name=<span style="color:#a31515;">&quot;col_Thumbnail&quot;</span>, Storage=<span style="color:#a31515;">&quot;_thumbnail&quot;</span>, FieldType=<span style="color:#a31515;">&quot;Invalid&quot;</span>)]
<span style="color:blue;">public virtual object </span>Thumbnail {
   <span style="color:blue;">get </span>{
      <span style="color:blue;">return this</span>._thumbnail;
   }
   <span style="color:blue;">set </span>{
      <span style="color:blue;">if </span>((<span style="color:blue;">value </span>!= <span style="color:blue;">this</span>._thumbnail)) {
            <span style="color:blue;">this</span>.OnPropertyChanging(<span style="color:#a31515;">&quot;Thumbnail&quot;</span>, <span style="color:blue;">this</span>._thumbnail);
            <span style="color:blue;">this</span>._thumbnail = <span style="color:blue;">value</span>;
            <span style="color:blue;">this</span>.OnPropertyChanged(<span style="color:#a31515;">&quot;Thumbnail&quot;</span>);
      }
   }
}</pre>
<p>Vous pouvez ainsi voir que le type n’est pas pris en compte.</p>
<p>Il vous suffira alors de changer les différents paramètres, le “FieldType”, le type de retour “object” afin de rendre la colonne fonctionnelle pour votre propre utilisation. </p>
<p>Nous verrons d’ailleurs par la suite, les différentes manières pour corriger ces limites de SPMetal pour chaque type de champ <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Sourire" src="http://yanngarit.files.wordpress.com/2011/01/wlemoticon-smile.png" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/417/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=417&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2011/01/16/sharepoint-2010-reprer-les-limites-de-la-gnration-spmetal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>

		<media:content url="http://yanngarit.files.wordpress.com/2011/01/wlemoticon-smile.png" medium="image">
			<media:title type="html">Sourire</media:title>
		</media:content>
	</item>
		<item>
		<title>[SharePoint 2010] Faire une WebPart asynchrone</title>
		<link>http://yanngarit.wordpress.com/2010/09/14/sharepoint-2010-faire-une-webpart-asynchrone/</link>
		<comments>http://yanngarit.wordpress.com/2010/09/14/sharepoint-2010-faire-une-webpart-asynchrone/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 13:04:35 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Technologies Microsoft]]></category>
		<category><![CDATA[Asynchrone; WebPart asynchrone; ICallbackEventHandler; RaiseCallbackEvent; GetCallbackResult]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/?p=412</guid>
		<description><![CDATA[Dans une page SharePoint, il se peut que plusieurs WebParts soient disposées un peu partout. Si vous lancez des requêtes sur des listes ou sur des bases de données par exemple, les temps de réponse peuvent être très longs, ce qui ralentira toute la page. Les temps de chargement seront de plus en plus longs [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=412&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dans une page SharePoint, il se peut que plusieurs WebParts soient disposées un peu partout.</p>
<p>Si vous lancez des requêtes sur des listes ou sur des bases de données par exemple, les temps de réponse peuvent être très longs, ce qui ralentira toute la page. Les temps de chargement seront de plus en plus longs pour l’utilisateur, puisqu’il faudra attendre la fin de tous les calculs pour que l’affichage apparaisse.</p>
<p>Si la WebPart n’est pas une des plus importantes, il y a une manière simple de la rendre asynchrone est ainsi nous pourrons charger la page très vite et avec un système de loading, faire apparaitre les données d’une WebPart plus gourmande quelques secondes après. L’utilisateur pourra alors parcourir la page tout en attendant que le dernier module se charge.</p>
<p>Il faut cependant savoir que le résultat de la callback, donc de l’événement, sera sous forme d’un “string”. Il faudra donc générer nous même le html afin de pouvoir afficher correctement des données. C’est le prix à payer pour pouvoir rentre votre WebPart asynchrone <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Avec un peu plus de temps, nous pouvons réussir à réaliser ce que l’on souhaite.</p>
<p>Pour commencer, dans le code behind de votre WebPart, il faut override le Render afin d’afficher une image de chargement, le temps que la requête se fasse.</p>
<p>&#160;</p>
<pre class="code"><span style="color:blue;">protected override void </span>Render(<span style="color:#2b91af;">HtmlTextWriter </span>writer)
{
    <span style="color:green;">// </span><span style="color:#00008b;">TODO: add custom rendering code here.
    </span><span style="color:blue;">this</span>.datadiv = <span style="color:blue;">this</span>.ClientID + <span style="color:#a31515;">&quot;content&quot;</span>;<span style="color:green;">    </span>writer.Write(<span style="color:#a31515;">&quot;&lt;div id=\&quot;&quot; </span>+ <span style="color:blue;">this</span>.datadiv + <span style="color:#a31515;">&quot;\&quot;&gt;&lt;img src=\&quot;_layouts/progressbar.GIF\&quot; width\&quot;300\&quot;&gt;&lt;/div&gt;&quot;</span>);
}</pre>
<p><span id="more-412"></span></p>
<p>Nous définissons là une nouveau div que nous allons créer, avec un nom unique pour éviter toutes confusions. Le plus simple est d’ajouter ensuite un GIF contenant une animation de chargement. Vous pouvez trouver votre bonheur ici : <a title="http://weblogs.asp.net/wkriebel/archive/2010/01/26/animated-gifs-in-sharepoint-2007-for-ajax-progress-indicators.aspx" href="http://weblogs.asp.net/wkriebel/archive/2010/01/26/animated-gifs-in-sharepoint-2007-for-ajax-progress-indicators.aspx">http://weblogs.asp.net/wkriebel/archive/2010/01/26/animated-gifs-in-sharepoint-2007-for-ajax-progress-indicators.aspx</a></p>
<p>Ce site vous invite également à aller voir dans votre dossier image de SharePoint pour aller récupérer l’animation qui vous convient le mieux <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Une fois votre animation mise en place, il faut maintenant faire hériter votre WebPart avec :</p>
<pre class="code"><span style="color:blue;">public partial class </span><span style="color:#2b91af;">VisualWebPart1UserControl </span>: <span style="color:#2b91af;">UserControl</span>, <span style="color:#2b91af;">ICallbackEventHandler
</span></pre>
<p>En effet l’interface de ICallbackEventHandler vous permet de rendre asynchrone la communication avec le serveur.</p>
<p>Il vous donne accès à 2 fonctions à implémenter :</p>
<pre class="code"><span style="color:blue;">public void </span>RaiseCallbackEvent(<span style="color:blue;">string </span>eventArgs)
{

    <span style="color:#2b91af;">StringBuilder </span>sb = <span style="color:blue;">new </span><span style="color:#2b91af;">StringBuilder</span>();
    <span style="color:#2b91af;">SPSite </span>mySite = <span style="color:#2b91af;">SPContext</span>.Current.Site;

    <span style="color:#2b91af;">SPWebCollection </span>subSites = mySite.AllWebs;
    <span style="color:blue;">this</span>.data = mySite.Url.ToString() + <span style="color:#a31515;">&quot;&lt;BR&gt;&quot;</span>;
    <span style="color:blue;">for </span>(<span style="color:blue;">int </span>i = 0; i &lt; subSites.Count; i++)
    {
        <span style="color:#2b91af;">SPListCollection </span>lists = subSites[i].Lists;

        <span style="color:blue;">for </span>(<span style="color:blue;">int </span>j = 0; j &lt; lists.Count; j++)
        {
            sb.Append(subSites[i].Title + <span style="color:#a31515;">&quot;--&quot; </span>+ lists[j].Title + <span style="color:#a31515;">&quot;&lt;BR&gt;&quot;</span>);
            <span style="color:blue;">this</span>.data = sb.ToString();
        }
    }
}</pre>
<p>C’est votre fonction “lente” à exécuter, dans cette exemple. Je charge la liste de toutes les listes du site SharePoint, et je les affiche les unes à la suite des autres grâce au “&lt;br&gt;”</p>
<p>Un fois le calcul exécuté, la fonction :</p>
<pre class="code"><span style="color:blue;">public string </span>GetCallbackResult()
{
    <span style="color:blue;">return this</span>.data;
}</pre>
<p>Vous renvoie le résultat.</p>
<p>Efficace et rapide à mettre en place.</p>
<p>Pour les plus curieux d’entre vous, les GridViews, DetailView… possèdent également une propriété <span style="color:#2b91af;">ICallbackEventHandler.<font color="#000000"> A vous d’aller plus loin pour l’utiliser avec ce genre de composant, une indice. Allez voir du côté d’I</font></span><span style="color:#2b91af;"><font color="#000000">AsynResult !</font></span></p>
<p><span style="color:#2b91af;"><font color="#000000">A vous de jouer <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </font></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/412/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=412&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2010/09/14/sharepoint-2010-faire-une-webpart-asynchrone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>
	</item>
		<item>
		<title>[SharePoint 2010] Edition d&#8217;une page avec une webpart erron&#233;e</title>
		<link>http://yanngarit.wordpress.com/2010/09/14/sharepoint-2010-edition-dune-page-avec-une-webpart-errone/</link>
		<comments>http://yanngarit.wordpress.com/2010/09/14/sharepoint-2010-edition-dune-page-avec-une-webpart-errone/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 10:04:40 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Technologies Microsoft]]></category>
		<category><![CDATA[SharePoint 2010; WebPart erronée; bug page; contents=1]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/2010/09/14/sharepoint-2010-edition-dune-page-avec-une-webpart-errone/</guid>
		<description><![CDATA[Il vous est surement déjà arrivé d’insérer une webpart dans une page de votre site SharePoint, mais malheureusement, il peut arriver qu’elle ne fonctionne pas du premier coup. Et vu que vous êtes bien sûr en mode debug (CutomError = off…) , vous avez un bel écran jaune comme on les aime ! &#160; La [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=411&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Il vous est surement déjà arrivé d’insérer une webpart dans une page de votre site SharePoint, mais malheureusement, il peut arriver qu’elle ne fonctionne pas du premier coup.</p>
<p>Et vu que vous êtes bien sûr en mode debug (CutomError = off…) , vous avez un bel écran jaune comme on les aime !</p>
<p><a href="http://yanngarit.files.wordpress.com/2010/09/image.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://yanngarit.files.wordpress.com/2010/09/image_thumb.png?w=825&#038;h=503" width="825" height="503" /></a>&#160;</p>
<p>La solution?</p>
<p>    <span id="more-411"></span>
<p>Facile, il suffit d’ajouter à votre adresse .aspx :&#160; contents=1 en querystring.</p>
<p><a href="http://yanngarit.files.wordpress.com/2010/09/image1.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://yanngarit.files.wordpress.com/2010/09/image_thumb1.png?w=310&#038;h=32" width="310" height="32" /></a></p>
<p>Vous avez alors accès à un menu où vous pouvez enlever n’importe qu&#8217;elle webpart dans votre page.</p>
<p><a href="http://yanngarit.files.wordpress.com/2010/09/image2.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://yanngarit.files.wordpress.com/2010/09/image_thumb2.png?w=819&#038;h=296" width="819" height="296" /></a></p>
<p>C’est gagné !</p>
<p>C’est d’ailleurs tout simplement le menu que vous propose SharePoint dans la pop-up quand vous n’êtes pas en mode débug !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/411/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=411&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2010/09/14/sharepoint-2010-edition-dune-page-avec-une-webpart-errone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>

		<media:content url="http://yanngarit.files.wordpress.com/2010/09/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://yanngarit.files.wordpress.com/2010/09/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://yanngarit.files.wordpress.com/2010/09/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>[MS] Concours Windows Phone 7&#8211;ProgTV</title>
		<link>http://yanngarit.wordpress.com/2010/08/24/ms-concours-windows-phone-7progtv/</link>
		<comments>http://yanngarit.wordpress.com/2010/08/24/ms-concours-windows-phone-7progtv/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 20:51:53 +0000</pubDate>
		<dc:creator>Yann Garit</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Concours windows phone 7]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">https://yanngarit.wordpress.com/2010/08/24/ms-concours-windows-phone-7progtv/</guid>
		<description><![CDATA[Avec Dorian Lamandé nous participons au concours de développement sur Windows Phone 7 : Rendez vous ici : http://www.facebook.com/home.php#!/video/video.php?v=445160459896&#38;oid=129459787073480 et cliquez sur &#171;&#160;J&#8217;aime&#160;&#187; pour nous soutenir ! C’est à vous de jouer<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=402&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Avec <a href="http://www.facebook.com/profile.php?id=1113415073">Dorian Lamandé</a> nous participons au concours de développement sur Windows Phone 7 : Rendez vous ici : <a href="http://www.facebook.com/video/video.php?v=445160459896&amp;oid=129459787073480">http://www.facebook.com/home.php#!/video/video.php?v=445160459896&amp;oid=129459787073480</a> et cliquez sur &laquo;&nbsp;J&#8217;aime&nbsp;&raquo; pour nous soutenir !</p>
<p>C’est à vous de jouer <img class="wlEmoticon wlEmoticon-smile" style="border-style:none;" src="http://yanngarit.files.wordpress.com/2010/08/wlemoticonsmile.png" alt="Sourire" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yanngarit.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yanngarit.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yanngarit.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yanngarit.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yanngarit.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yanngarit.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yanngarit.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yanngarit.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yanngarit.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yanngarit.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yanngarit.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yanngarit.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yanngarit.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yanngarit.wordpress.com/402/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yanngarit.wordpress.com&amp;blog=8305768&amp;post=402&amp;subd=yanngarit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yanngarit.wordpress.com/2010/08/24/ms-concours-windows-phone-7progtv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/63db9e411da6ea220e02a187ec23f7cb?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yann Garit</media:title>
		</media:content>

		<media:content url="http://yanngarit.files.wordpress.com/2010/08/wlemoticonsmile.png" medium="image">
			<media:title type="html">Sourire</media:title>
		</media:content>
	</item>
	</channel>
</rss>
