<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4209078922660592288</id><updated>2026-09-07T07:27:12.270+02:00</updated><category term="ASP.NET"/><category term="C#"/><category term="MVC"/><category term="layout"/><category term="localization"/><category term="DateTime Format"/><category term="Template parameters"/><category term="facebook"/><category term="logging"/><category term="mockup"/><category term="pagination"/><category term="post wall"/><category term="project management"/><category term="template Razor MVC3"/><category term="time control"/><category term="tracking"/><category term="webdesign"/><category term="wireframe"/><title type='text'>Omar Venturi&#39;s Blog</title><subtitle type='html'>Software development, technologies and social phenomena</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://omarventuri.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://omarventuri.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Omar Venturi</name><uri>http://www.blogger.com/profile/07155661831741819990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKw82-ucaIM5rtY-r19UjQ3os2sUxkD8Ss7O3axjGUnwZkceLlwAfMUwDeNZRI0Au2l_dsPMj926aCZ4DbPVsjT25LSyQDcG3-w3EmucCkyfcFsIex_IVVILFJdskRA/s1600/foto.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4209078922660592288.post-289110876151525608</id><published>2011-07-17T22:37:00.003+02:00</published><updated>2011-07-17T22:40:50.705+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="DateTime Format"/><category scheme="http://www.blogger.com/atom/ns#" term="layout"/><category scheme="http://www.blogger.com/atom/ns#" term="localization"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="Template parameters"/><category scheme="http://www.blogger.com/atom/ns#" term="template Razor MVC3"/><title type='text'>How to pass parameters to ASP.NET MVC3 Razor EditorTemplates</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;ASP.NET MVC2 introduced a great feature: &lt;b&gt;template personalization&lt;/b&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;MVC offers some default templates executed automatically when we call some Html helper methods, such as @Html.EditorFor.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As well explained in &lt;a href=&quot;http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.html&quot;&gt;this series of posts&lt;/a&gt; the system has built-in support for 9 &lt;b&gt;display&lt;/b&gt; template names: “Boolean”, “Decimal”, “EmailAddress”, “HiddenInput”, “Html”, “Object”, “String”, “Text”, and “Url” and for 7 &lt;b&gt;editor &lt;/b&gt;templates: “Boolean”, “Decimal”, “HiddenInput”, “MultilineText”, “Object”, “Password”, and “String”.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Is quite simple to support new kind of data like DateTime. It&#39;s enough to add a folder named &quot;EditorTemplates&quot; wherever you want in a View folder and add a new partial view.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You can add the folder in /Views/Shared/EditorTemplates, /Views/&lt;i&gt;yourEntity&lt;/i&gt;&lt;yourentity&gt;/EditorTemplates, /Areas/&lt;i&gt;yourArea&lt;/i&gt;/&lt;/yourentity&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;yourEntity&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;yourentity&gt;/EditorTemplates and so on; you have only to name the folder &quot;EditorTemplates&quot;.&lt;br /&gt;
&lt;/yourentity&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;yourentity&gt; I&#39;ve created a DateTime template because with solutions I&#39;ve found online, there was some limits:&lt;/yourentity&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It&#39;s possible control the datetime format with DataAnnotations feature, but this is useful only if dataformat is constant. I need to alter the format of the dates related to user&#39;s culture&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Templates can receive data from caller view such as the Model and the ViewData. Unfortunately, inside template, ViewData is a global collection and I haven&#39;t found a way to retrieve only parameter related to current template&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here are a couple of samples:&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://stackoverflow.com/questions/5252979/assign-format-of-datetime-with-data-annotations&quot;&gt;Here is&lt;/a&gt; how to use DataAnnotations to specify DataFormat&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = &quot;{0:MM/dd/yyyy}&quot;)]  
&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://geekswithblogs.net/michelotti/archive/2010/02/05/mvc-2-editor-template-with-datetime.aspx&quot;&gt;Here is&lt;/a&gt;&amp;nbsp;how to format DateTime inside template&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; @Html.TextBox(&quot;&quot;, (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty), new { @class = &quot;datePicker&quot; })  
&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;Here is how to &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&lt;b&gt;pass &lt;/b&gt;&lt;/span&gt;data to a template&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; @Html.EditorFor(m =&amp;gt; m.MainEntity.Birthday, new { id = &quot;datepicker&quot;, style = &quot;width:100px;&quot; })  
&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #134f5c; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;and how to&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #45818e;&quot;&gt;use&amp;nbsp;&lt;/span&gt;&lt;/b&gt;them inside template&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #134f5c; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;@model DateTime?&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #134f5c; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;@Html.Texbox(ViewData[&quot;id&quot;], Model.Value, new {style = @ViewData[&quot;style&quot;]})  
&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal;&quot;&gt;So, to make solution more dynamic, I&#39;ve implemented a template like the following&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; @model DateTime?  
 @using System.Globalization  
 @{  
   Dictionary&amp;lt;string, object&amp;gt; actualViewData = new Dictionary&amp;lt;string, object&amp;gt;();  
   foreach (var item in ViewData.Keys)  
   {  
     if (item.StartsWith(&quot;_&quot;))  
     {  
       actualViewData.Add(item.Substring(1), ViewData[item]);  
     }  
   }    
 }  
 @Html.TextBox(&quot;&quot;, (Model.HasValue ? Model.Value.ToString(CultureInfo.CurrentUICulture.DateTim&lt;/code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;eFormat.ShortDatePattern) : string.Empty), actualViewData)  &lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;and I use it with following statement&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;word-wrap: normal;&quot;&gt; @Html.EditorFor(m =&amp;gt; m.MainEntity.Birthday, new {&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; _id&lt;/span&gt;&lt;/b&gt; = &quot;datepicker&quot;, &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;_style&lt;/span&gt;&lt;/b&gt; = &quot;width:100px;&quot; })  &lt;/code&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As you can see, the only difference with standard solution is that you have &quot;mark&quot; the key with a prefix char; this allow the parsing inside template.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If someone have found a better solution, please, add a comment to this post, so I can update it.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://omarventuri.blogspot.com/feeds/289110876151525608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://omarventuri.blogspot.com/2011/07/how-to-pass-parameters-to-aspnet-mvc3.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/289110876151525608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/289110876151525608'/><link rel='alternate' type='text/html' href='http://omarventuri.blogspot.com/2011/07/how-to-pass-parameters-to-aspnet-mvc3.html' title='How to pass parameters to ASP.NET MVC3 Razor EditorTemplates'/><author><name>Omar Venturi</name><uri>http://www.blogger.com/profile/07155661831741819990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKw82-ucaIM5rtY-r19UjQ3os2sUxkD8Ss7O3axjGUnwZkceLlwAfMUwDeNZRI0Au2l_dsPMj926aCZ4DbPVsjT25LSyQDcG3-w3EmucCkyfcFsIex_IVVILFJdskRA/s1600/foto.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4209078922660592288.post-1511822174344722943</id><published>2011-02-27T19:08:00.001+01:00</published><updated>2011-02-27T19:12:18.948+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="localization"/><category scheme="http://www.blogger.com/atom/ns#" term="logging"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="pagination"/><title type='text'>Tips to scaffold a new ASP.NET MVC3 application</title><content type='html'>The purpose of this post is simply to collect some useful articles to scaffold a new ASP.NET MVC3 projects (most of techniques described here, are compatible with MVC2 version).&lt;br /&gt;
&lt;br /&gt;
In these days I&#39;ve investigated on web to find the best practices for add some basic services to a new web project.&lt;br /&gt;
As &quot;basic services&quot; I mean services like logging, tracing, authorization, localization, pagination and so on.&lt;br /&gt;
&lt;br /&gt;
Here is what I&#39;ve found.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Logging and Tracing&lt;/h2&gt;Logging and tracing have not always a clear separation. Anyway, for the purpose of this post, &lt;em&gt;Logging&lt;/em&gt; is the action of &quot;log unhandled exception&quot;.&lt;br /&gt;
A great library to cover this work is Elmah (&lt;a href=&quot;http://elmah.googlecode.com&quot;&gt;elmah.googlecode.com&lt;/a&gt;). Elmah both logs unhandled exceptions and provide a useful user interface to view them.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;Tracing&lt;/em&gt; is instead the operation that allows the developer to store (in a generic repository such as a database or an xml file) information to control the application and to simplify the development also.&lt;br /&gt;
There are some libraries to accomplish this task, anyway the most popular are &lt;a href=&quot;http://logging.apache.org/log4net&quot;&gt;log4net&lt;/a&gt; and &lt;a href=&quot;http://www.nlog-project.org&quot;&gt;NLog&lt;/a&gt;.&lt;br /&gt;
Furthermore, to collect information about the health of the application, ASP.NET offers the &quot;healt monitoring system&quot;, introduced in ASP.NET 2.0 and designed to monitor the health of a &lt;em&gt;deployed&lt;/em&gt; ASP.NET application by logging events that occur during the application or request&#39;s lifetime. &lt;a href=&quot;http://www.asp.net/hosting/tutorials/logging-error-details-with-asp-net-health-monitoring-cs&quot;&gt;Here&lt;/a&gt; you can find a tutorial to integrate Health Monitoring.&lt;br /&gt;
&lt;br /&gt;
So, a very good article with a step-by-step sample is here: &lt;a href=&quot;http://www.codeproject.com/KB/trace/mvc_logging.aspx&quot;&gt;Log Reporting Dashboard for ASP.NET MVC&lt;/a&gt;.&lt;br /&gt;
In this article, the author integrates Log4Net, NLog, Elmah, and ASP.NET Health Monitoring into an ASP.NET MVC Website, and provides a log reporting dashboard that will allow you to filter the messages by time period, log level, and log provider.&lt;br /&gt;
You can find the same article, in a more detailed version in &lt;a href=&quot;http://dotnetdarren.wordpress.com/&quot;&gt;author&#39;s blog&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Pagination&lt;/h2&gt;An article that describes a general purpose solution for pagination is here: &lt;a href=&quot;http://blogs.taiga.nl/martijn/2008/08/27/paging-with-aspnet-mvc/&quot;&gt;Paging with ASP.NET MVC&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Authorization&lt;/h2&gt;Default ASP.NET MVC3 application template in Visual Studio 2010 offers an adequate solution to manage authorizations. It offers a pre-configured solution uses Windows Forms authentication and  ASP.NET Configuration web site. &lt;br /&gt;
Yes, I was not too inclined to use these tools, but if you decide to use the solutions offered by Microsoft (without reinventing the whee) I have to say that these solutions are very comfortable.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Localization&lt;/h2&gt;For localization, I suggest these articles:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://geekswithblogs.net/shaunxu/archive/2010/05/06/localization-in-asp.net-mvc-ndash-3-days-investigation-1-day.aspx&quot;&gt;Localization in ASP.NET MVC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://adamyan.blogspot.com/2010/02/aspnet-mvc-2-localization-complete.html&quot;&gt;ASP.NET MVC 2 Localization complete guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;h2&gt;Learn MVC3&lt;/h2&gt;Finally (even if it should be at the beginning of this post) I put here some useful free resources to start to learn ASP.NET MVC3&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part1-cs&quot;&gt;Intro to ASP.NET MVC 3&lt;/a&gt; (official Microsoft documentation)&lt;br /&gt;
&lt;a href=&quot;http://www.wrox.com/WileyCDA/Section/id-321793.html&quot;&gt;(ScottGu) NerdDinner.com chapter! (&lt;a href=&quot;http://content.wrox.com/wroxfiles/aspnetmvc-nerdinner_v2.pdf&quot;&gt;pdf direct link&lt;/a&gt;)&lt;/a&gt; A free chapter (177pages!) where you can find a complex application explained step-by-step (see the result at &lt;a href=&quot;http://nerddinner.com/&quot;&gt;nerddinner.com&lt;/a&gt;)</content><link rel='replies' type='application/atom+xml' href='http://omarventuri.blogspot.com/feeds/1511822174344722943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://omarventuri.blogspot.com/2011/02/tips-to-scaffold-new-aspnet-mvc3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/1511822174344722943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/1511822174344722943'/><link rel='alternate' type='text/html' href='http://omarventuri.blogspot.com/2011/02/tips-to-scaffold-new-aspnet-mvc3.html' title='Tips to scaffold a new ASP.NET MVC3 application'/><author><name>Omar Venturi</name><uri>http://www.blogger.com/profile/07155661831741819990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKw82-ucaIM5rtY-r19UjQ3os2sUxkD8Ss7O3axjGUnwZkceLlwAfMUwDeNZRI0Au2l_dsPMj926aCZ4DbPVsjT25LSyQDcG3-w3EmucCkyfcFsIex_IVVILFJdskRA/s1600/foto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4209078922660592288.post-6202344566675038478</id><published>2011-02-10T22:38:00.001+01:00</published><updated>2011-02-27T19:09:11.112+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="project management"/><category scheme="http://www.blogger.com/atom/ns#" term="time control"/><category scheme="http://www.blogger.com/atom/ns#" term="tracking"/><title type='text'>Paymo: a great time tracking online tool</title><content type='html'>There are many tools online to support time tracking activity and a lot of these have good quality. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS1OqOJbBwfeAZ5yR4aA16o44IzpvvI3YHPdBeNg8R7Nua0E1pZmYCeXS9tHegjuf8u-B_lEiI8KwNVKwq15DGPS47FVobVCjt7KdIm2Yl-cboQaGxDRZO24uLbNQW-TT4_lSon385wkc/s1600/logo.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; float:left;margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;82&quot; width=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS1OqOJbBwfeAZ5yR4aA16o44IzpvvI3YHPdBeNg8R7Nua0E1pZmYCeXS9tHegjuf8u-B_lEiI8KwNVKwq15DGPS47FVobVCjt7KdIm2Yl-cboQaGxDRZO24uLbNQW-TT4_lSon385wkc/s320/logo.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Today I&#39;ve discovered Paymo (&lt;a href=&quot;http://www.paymo.biz&quot;&gt;http://www.paymo.biz&lt;/a&gt;) a time tracker tool with a great set of features, an useful interface and a very easy learning curve. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tool follows a classical workflow: &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;register users (developers, employees, engineers, and so on)&lt;/li&gt;
&lt;li&gt;register customers&lt;/li&gt;
&lt;li&gt;create projects of customers&lt;/li&gt;
&lt;li&gt;create activities of projects (each project has a two-level set of activities)&lt;/li&gt;
&lt;li&gt;assign roles to users for each project (user, administrator)&lt;/li&gt;
&lt;li&gt;enable users to register theirs activities&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
So, at this point, every user has its own dashboard, and every project administrator has a unique environment to create reports, to control budget and milestones and to emit invoices.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAEW3P_VGEDfJsGObbLynIVLdDNTyQpAfgHprT_WsPdLdZEju7utiCzNJtDu16LHucKmuNYZeFXcNuI_uxfVh2BsUCTup2-dnyoda9Fb_hFHvSYd0uqCKoEh6FoqLqVrCi4oK8hT6OyVc/s1600/The-Dashboard.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; float:left;margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAEW3P_VGEDfJsGObbLynIVLdDNTyQpAfgHprT_WsPdLdZEju7utiCzNJtDu16LHucKmuNYZeFXcNuI_uxfVh2BsUCTup2-dnyoda9Fb_hFHvSYd0uqCKoEh6FoqLqVrCi4oK8hT6OyVc/s320/The-Dashboard.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Paymo&#39;s user interface is available in many languages (english, italian, german, spanish, french and others) and user can track time both in &lt;i&gt;live&lt;/i&gt; mode (with a stopwatch tool) and in &lt;i&gt;classic&lt;/i&gt; mode by manually add time entries or edit existing ones. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How much it costs?&lt;br /&gt;
Paymo has a &lt;b&gt;free&lt;/b&gt; and fully-functional release which supports two users, unlimited time trackings  and three invoices per months.&lt;br /&gt;
If you need to track time for more than three employees you need Paymo Premium: 3.99$/user/months or &lt;b&gt;free&lt;/b&gt; for non-profit companies.&lt;br /&gt;
To have unlimited invoices, the cost is 9.99$/month. Look at &lt;a href=&quot;http://www.paymo.biz/time-tracking-invoicing-pricing.html&quot; target=&quot;_blank&quot;&gt;pricing&lt;/a&gt; to see more details and to get last prices. &lt;br /&gt;
&lt;br /&gt;
Paymo is available through a set of API also, consists of a set of callable methods to manage entities like projects, tasks, companies and so on.&lt;br /&gt;
&lt;br /&gt;
Note for freelancers: every account is linked to a unique company. So, if you work in two or more companies and every company uses Paymo to track the time, you need a different account for everyone.</content><link rel='replies' type='application/atom+xml' href='http://omarventuri.blogspot.com/feeds/6202344566675038478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://omarventuri.blogspot.com/2011/02/paymo-great-time-tracking-online-tool.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/6202344566675038478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/6202344566675038478'/><link rel='alternate' type='text/html' href='http://omarventuri.blogspot.com/2011/02/paymo-great-time-tracking-online-tool.html' title='Paymo: a great time tracking online tool'/><author><name>Omar Venturi</name><uri>http://www.blogger.com/profile/07155661831741819990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKw82-ucaIM5rtY-r19UjQ3os2sUxkD8Ss7O3axjGUnwZkceLlwAfMUwDeNZRI0Au2l_dsPMj926aCZ4DbPVsjT25LSyQDcG3-w3EmucCkyfcFsIex_IVVILFJdskRA/s1600/foto.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS1OqOJbBwfeAZ5yR4aA16o44IzpvvI3YHPdBeNg8R7Nua0E1pZmYCeXS9tHegjuf8u-B_lEiI8KwNVKwq15DGPS47FVobVCjt7KdIm2Yl-cboQaGxDRZO24uLbNQW-TT4_lSon385wkc/s72-c/logo.gif" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4209078922660592288.post-2544783031874320249</id><published>2011-02-05T08:57:00.008+01:00</published><updated>2011-03-01T20:12:21.499+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="layout"/><category scheme="http://www.blogger.com/atom/ns#" term="mockup"/><category scheme="http://www.blogger.com/atom/ns#" term="webdesign"/><category scheme="http://www.blogger.com/atom/ns#" term="wireframe"/><title type='text'>A little set of tools to design a Web Site</title><content type='html'>When we are involved in design phase of a new web site, we often need some tools to facilitate our work even if we don&#39;t always use them: sometimes because the project is easy, sometimes because we don&#39;t know any tool or we want to start to write code immediately.  I want to present here some free tools to accomplish various tasks about design web sites that, I think, can really help us in this activity.  Design a web site, in this context, means to define:  &lt;ul&gt;&lt;li&gt;the &lt;strong&gt;layout&lt;/strong&gt;, which is the grid of the elements of the page&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;schema color&lt;/strong&gt;, which is the set of primary colors used in our project&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;font set&lt;/strong&gt;, which is the set of fonts (often one or two fonts) and their dimensions&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;interaction flow&lt;/strong&gt;, which is the map of the links between pages &lt;/ul&gt;

&lt;h3&gt;Layout and Interaction&lt;/h3&gt;The first tool is both to define &lt;em&gt;layout&lt;/em&gt; and &lt;em&gt;interaction flow&lt;/em&gt;: &lt;a href=&quot;http://pencil.evolus.vn&quot; target=&quot;_blank&quot;&gt;Pencil Project&lt;/a&gt; a tool to sketching and prototyping GUI (not only for web), working both as Firefox addon or as standalone application available for GNU/Linux, Windows, MacOS X. With Pencil we can quickly create many different layouts with a wireframe style. &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWqxW0hWEH8xgJz4R31ttiq0s79vchnUa9TEtkGWdG_Xcd7s1NE6UlzNZtk2VRVhoGWmGG8OlC_NFEYZ11PvExOCa2VBuZoaOPyUPqUKFw6G_e8j_t2EcTbiyF-KLg5c0FgRcD6ZW26yM/s1600/pencil1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; float:left;margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;208&quot; width=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWqxW0hWEH8xgJz4R31ttiq0s79vchnUa9TEtkGWdG_Xcd7s1NE6UlzNZtk2VRVhoGWmGG8OlC_NFEYZ11PvExOCa2VBuZoaOPyUPqUKFw6G_e8j_t2EcTbiyF-KLg5c0FgRcD6ZW26yM/s320/pencil1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Pencil organizes its pages in tabs and collect them into a Project file (.ep extension). Pencil allows you to link elements of a page (such as buttons, images and so on) to other pages. In this way you can define the &lt;em&gt;interaction flow&lt;/em&gt;. Finally, you can export your project in a unique web page to simulate the interaction. A &quot;unique&quot; web page is very convenient because you can use your layout both as a user (by clicking on elements) or as a developer (by scroll up and down every single page). In fact, the export is nothing but a sequence of images linked together that are positioned at the correct height by using #anchor: simple and very useful solution.  Now, if you need some inspiration about wireframes, you can found some samples at &lt;a href=&quot;http://wireframes.tumblr.com/&quot; target=&quot;_blank&quot;&gt;http://wireframes.tumblr.com/&lt;/a&gt;    

&lt;h3&gt;Schema color&lt;/h3&gt;There are many tools to define your schema color, such as &lt;a href=&quot;http://www.colorhunter.com&quot; target=&quot;_blank&quot;&gt;colorhunter&lt;/a&gt; or &lt;a href=&quot;http://colorschemedesigner.com/&quot; target=&quot;_blank&quot;&gt;colorschemedesigner&lt;/a&gt;, but I want to suggest you &lt;a href=&quot;http://kuler.adobe.com&quot; target=&quot;_blank&quot;&gt;Kuler&lt;/a&gt;, an Adobe Flash tool. Kuler is available online with no charge.  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJWRoLpqlWqKMhfQ343ESnCoBe8uLeejJBKozWe-yxjUY96pJbeEOq_Q-yNDnBKs-VO7Umf39oJ1pYyvAg9LgfPkl3sChCYYshzXLtMD5kvNop22v28BQs1wqK8ew7pORl0JitYh1XlqI/s1600/kuler.png&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; float:left;margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; width=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJWRoLpqlWqKMhfQ343ESnCoBe8uLeejJBKozWe-yxjUY96pJbeEOq_Q-yNDnBKs-VO7Umf39oJ1pYyvAg9LgfPkl3sChCYYshzXLtMD5kvNop22v28BQs1wqK8ew7pORl0JitYh1XlqI/s320/kuler.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;You can try to create your schemas, save them, share them and explore community&#39;s schema. Kuler&#39;s interface is very easy and intuitive and you can immediately start to use it. You have to register in Kuler only to save your schema, but to copy HEX color in your graphic tool registration is not required.




&lt;h3&gt;Font set&lt;/h3&gt;To choose web-safe fonts you can follow two directions: &lt;ul&gt;&lt;li&gt;choose common fonts for primary platforms and browsers&lt;/li&gt;
&lt;li&gt;include in you site an external font definition&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;Common fonts&lt;/h5&gt;You find common fonts at &lt;a href=&quot;http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html&quot; target=&quot;_blank&quot;&gt;ampsoft.net&lt;/a&gt;. Here you can find the list with the standard set of fonts common to all versions of Windows and their Mac substitutes, referred sometimes as &quot;browser safe fonts&quot;. You can also find several screen shots to see how the fonts are displayed in other OS&#39;s or browsers than yours.   
&lt;h5&gt;External font&lt;/h5&gt;&lt;a href=&quot;http://code.google.com/webfonts&quot; target=&quot;_blank&quot;&gt;Google Web Fonts&lt;/a&gt; lets you browse all the fonts available via the Google Font API. All fonts in the directory are available for use on your website under an open source license and are served by Google servers.  &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8wM4_Dmo0Ib6PofKa6TUyy5yAJWts10QqhSvrgIbrBWF5KbufO5D7nQc2WKPiKYpqOZp40xb8KcQZLaO7vu-5-EtqR7b_8Xk6pmOYFK4rCGe2en98K5jdF3_7YtG9z97qce1Yp3BpgAs/s1600/WebFonts.png&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; float:left;margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;205&quot; width=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8wM4_Dmo0Ib6PofKa6TUyy5yAJWts10QqhSvrgIbrBWF5KbufO5D7nQc2WKPiKYpqOZp40xb8KcQZLaO7vu-5-EtqR7b_8Xk6pmOYFK4rCGe2en98K5jdF3_7YtG9z97qce1Yp3BpgAs/s320/WebFonts.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;You can see the online preview of &lt;em&gt;real&lt;/em&gt; fonts in your browser (not images) and also try different size, variant and decoration with &lt;a href=&quot;http://code.google.com/webfonts/preview&quot; target=&quot;_blank&quot;&gt;font previewer&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://omarventuri.blogspot.com/feeds/2544783031874320249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://omarventuri.blogspot.com/2011/02/little-set-of-tools-to-design-web-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/2544783031874320249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/2544783031874320249'/><link rel='alternate' type='text/html' href='http://omarventuri.blogspot.com/2011/02/little-set-of-tools-to-design-web-site.html' title='A little set of tools to design a Web Site'/><author><name>Omar Venturi</name><uri>http://www.blogger.com/profile/07155661831741819990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKw82-ucaIM5rtY-r19UjQ3os2sUxkD8Ss7O3axjGUnwZkceLlwAfMUwDeNZRI0Au2l_dsPMj926aCZ4DbPVsjT25LSyQDcG3-w3EmucCkyfcFsIex_IVVILFJdskRA/s1600/foto.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWqxW0hWEH8xgJz4R31ttiq0s79vchnUa9TEtkGWdG_Xcd7s1NE6UlzNZtk2VRVhoGWmGG8OlC_NFEYZ11PvExOCa2VBuZoaOPyUPqUKFw6G_e8j_t2EcTbiyF-KLg5c0FgRcD6ZW26yM/s72-c/pencil1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4209078922660592288.post-4621447879835947592</id><published>2011-01-22T09:19:00.002+01:00</published><updated>2011-01-22T09:27:40.811+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="facebook"/><category scheme="http://www.blogger.com/atom/ns#" term="post wall"/><title type='text'>How to publish a post on a Facebook user&#39;s wall with C#</title><content type='html'>Hi guys, I waste my time to find a way to publish a post on a user&#39;s wall in Facebook using only C#, without any external library (such as &lt;a href=&quot;http://msdn.microsoft.com/en-us/windows/ee388574&quot; target=&quot;_blank&quot;&gt;Facebook SDK&lt;/a&gt;).&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I found some samples to update status, but nothing that allow to publish a &quot;complex&quot; post, that is a post with picture, action, description and so on.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Ok, let&#39;s see briefly my solution.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;First steps are always the same, and there are tons of documentation online to deepen these arguments. Anyway, to setup application, you have to:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1. register your application in Facebook (&lt;a href=&quot;http://www.facebook.com/developers/&quot;&gt;http://www.facebook.com/developers/&lt;/a&gt;)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;2 .obtain AppId, AppSecret and AppKey&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;3. Add fb namespace&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;blockquote&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xmlns:fb=&quot;http://www.facebook.com/2008/fbml&quot;&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;; white-space: pre;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;4. insert in your page the javascript client side (replace en_US with valid iso code as it_IT, fr_FR and so on)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;lt;script src=&quot;http://connect.facebook.net/en_US/all.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-family: Georgia, serif; white-space: pre;&quot;&gt; &lt;/span&gt;5. insert following code to allow asynchronously load of javascript code&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: dashed; border-top-width: 1px; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;word-wrap: normal;&quot;&gt; &amp;lt;div id=&quot;fb-root&quot;&amp;gt;&amp;lt;/div&amp;gt;  
 &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;   
   FB.init({ appId: &#39;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;your_appId&lt;/span&gt;&lt;/b&gt;&#39;, status: true, cookie: true, xfbml: true });    
     
   FB.Event.subscribe(&#39;auth.login&#39;, function(response){    
      window.location.reload();   
   });   
   
   FB.Event.subscribe(&#39;auth.logout&#39;, function(response){    
      window.location.reload();   
   });  
 &amp;lt;/script&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;div id=&quot;\&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;With this code, you are using &lt;i&gt;Facebook Connect&lt;/i&gt;, the OAuth implementation of Facebook.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Up to here no problem: many documentation, many samples and, as you can see, only javascrpt code. Let&#39;s see now how to write on user&#39;s wall with Graph API.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Graph APIs require a mandatory parameter named &quot;access_token&quot;. This parameter is contained in facebook OAuth cookie session and its value changes every session.&lt;/div&gt;&lt;div&gt;So, how can you retrieve this value?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;First, the cookie name has this pattern &quot;fbs_{0}&quot; where {0} is the AppId (see step 2 previously).&lt;/div&gt;&lt;div&gt;So, the code is:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; string cookieName = string.Format(&quot;fbs_{0}&quot;, &quot;&lt;/code&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;your_appId&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;&quot;);  &lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; HttpCookie fbCookie = HttpContext.Current.Request.Cookies[cookieName];  
 string mytoken = FacebookCookie.Values[&quot;\&quot;access_token&quot;];  
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;Note that the key is exactly &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&quot;\&quot;access_token&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;br /&gt;
Now, we are ready to post on our wall. Take a look to this code:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;courier new&#39;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; public void PostOnWall(string Name, string Message, string Description, string PictureUrl, string LinkCaption, string LinkUrl, string ActionName, string ActionUrl)  
   
 {  
   
    string action = &quot;https://graph.facebook.com/me/feed&quot;;  
    string postData = &quot;access_token=&quot; + mytoken;  
   
    if (!string.IsNullOrEmpty(Message)) { postData += (&quot;&amp;amp;message=&quot; + System.Web.HttpUtility.UrlEncode(Message)); }  
    if (!string.IsNullOrEmpty(LinkUrl)) { postData += (&quot;&amp;amp;link=&quot; + LinkUrl); }  
    if (!string.IsNullOrEmpty(PictureUrl)) { postData += (&quot;&amp;amp;picture=&quot; + PictureUrl); }  
    if (!string.IsNullOrEmpty(Name)) { postData += (&quot;&amp;amp;name=&quot; + System.Web.HttpUtility.UrlEncode(Name)); }  
    if (!string.IsNullOrEmpty(Description)) { postData += (&quot;&amp;amp;description=&quot; + System.Web.HttpUtility.UrlEncode(Description)); }  
    if (!string.IsNullOrEmpty(ActionName) &amp;amp;&amp;amp; !string.IsNullOrEmpty(ActionUrl)) { postData += (&quot;&amp;amp;actions=[{&#39;name&#39;: &quot; + System.Web.HttpUtility.UrlEncode(&quot;&#39;&quot; + ActionName + &quot;&#39;&quot;) + &quot;, &#39;link&#39;: &#39;&quot; + ActionUrl + &quot;&#39;}]&quot;); }  
   
    NetworkHelper.ExecuteHttpActionPost(action, postData);  
 }  
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&quot;https://graph.facebook.com/me/feed&quot; is the entrypoint to write on &lt;i&gt;current&lt;/i&gt; logged user&#39;s wall (more details&amp;nbsp;&lt;a href=&quot;http://developers.facebook.com/docs/reference/api/post#publishing&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;We have to call this entry point with an HTTP POST to send some data to Facebook.&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&quot;access_token&quot;: contains our session_token. This is the unique mandatory field&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&quot;message&quot;: if we set only this field, &lt;b&gt;we are going to update the user&#39; status&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmbB5DEKhB-AqgmWIer14l_vBOS_SS5Lzei2h-uCvND971BuVJyMyoEtP9k2IO1vkOvJ_s9bcqBOFysla8Nm7FrBdqhrJhyQMF5do3S9c924jJULpi_QeE25P0hbazDU17YRYPFxB1CIE/s1600/FB_Post_legend.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmbB5DEKhB-AqgmWIer14l_vBOS_SS5Lzei2h-uCvND971BuVJyMyoEtP9k2IO1vkOvJ_s9bcqBOFysla8Nm7FrBdqhrJhyQMF5do3S9c924jJULpi_QeE25P0hbazDU17YRYPFxB1CIE/s400/FB_Post_legend.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;Note: although the field is &quot;action&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;s&lt;/span&gt;&lt;/b&gt;&quot; you can add only one action. An action is a JSON object with two properties: text and link.&lt;br /&gt;
&lt;br /&gt;
Finally, let&#39;s see the code to make the HTTP call.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI7m4ZbscAA_Nx7XGMlEnaBO7PMvEHb354mussjLjbXZrFsZzoNgUG_yCASuwLqhaIbD0kO71asF-Xldmz4GPCVCwiHVPrrbWSKIGe1X1SCNZa6-4ZjCDBjHIG5nbBTCzdN08mBDGJ3aYf/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;     public static string ExecuteHttpActionPost(string Action, string PostData)  
     {  
   
       ASCIIEncoding encoding = new ASCIIEncoding();  
       byte[] data = encoding.GetBytes(PostData);  
   
   
       WebRequest request = WebRequest.Create(Action);  
       request.Method = &quot;post&quot;;  
       request.ContentType = &quot;application/x-www-form-urlencoded&quot;;  
       request.ContentLength = data.Length;  
       Stream newStream = request.GetRequestStream();  
       // Send the data.  
       newStream.Write(data, 0, data.Length);  
       newStream.Close();  
   
       WebResponse resp = request.GetResponse();  
       StreamReader sr = new StreamReader(resp.GetResponseStream());  
       string result = sr.ReadToEnd();  
       resp.Close();  
       return result;  
     }  
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://omarventuri.blogspot.com/feeds/4621447879835947592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://omarventuri.blogspot.com/2011/01/how-to-publish-post-on-facebook-users.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/4621447879835947592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4209078922660592288/posts/default/4621447879835947592'/><link rel='alternate' type='text/html' href='http://omarventuri.blogspot.com/2011/01/how-to-publish-post-on-facebook-users.html' title='How to publish a post on a Facebook user&#39;s wall with C#'/><author><name>Omar Venturi</name><uri>http://www.blogger.com/profile/07155661831741819990</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKw82-ucaIM5rtY-r19UjQ3os2sUxkD8Ss7O3axjGUnwZkceLlwAfMUwDeNZRI0Au2l_dsPMj926aCZ4DbPVsjT25LSyQDcG3-w3EmucCkyfcFsIex_IVVILFJdskRA/s1600/foto.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmbB5DEKhB-AqgmWIer14l_vBOS_SS5Lzei2h-uCvND971BuVJyMyoEtP9k2IO1vkOvJ_s9bcqBOFysla8Nm7FrBdqhrJhyQMF5do3S9c924jJULpi_QeE25P0hbazDU17YRYPFxB1CIE/s72-c/FB_Post_legend.png" height="72" width="72"/><thr:total>7</thr:total></entry></feed>