<?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-5655646</id><updated>2024-08-30T00:26:39.335-05:00</updated><category term="links"/><category term="rant"/><category term="me-me-me"/><category term="random"/><category term="tools"/><category term="howto"/><category term="experiment"/><category term="microsoft"/><category term="moss"/><category term="sharepoint"/><category term="errors"/><category term="silliness"/><category term="sql"/><category term="google"/><category term="programming"/><category term="resharper"/><category term="politics"/><category term="javascript"/><category term="c#"/><category term="energy"/><category term="yahoo"/><category term="asp.net"/><category term="code smith"/><category term="rave"/><category term="news"/><category term="hybrid"/><category term="visual studio"/><category term="idea"/><category term="failure"/><category term="business"/><category term="advertising"/><category term="asp.net mvc"/><category term="livewriter"/><category term="economics"/><category term="firefox"/><category term="html5"/><category term="mashup"/><category term="usability"/><category term="wiki"/><category term="mvc"/><category term="apple"/><category term="design"/><category term="olpc"/><category term="video"/><category term="virtualization"/><category term="jquery"/><category term="squrl"/><category term="SharePoint2010"/><category term="ajax"/><category term="css"/><category term="kids"/><category term="projectmanagement"/><category term="silverlight"/><category term="windows7"/><category term="xo"/><category term="icantbelieveihaventdonethisbefore"/><category term="marketing"/><category term="mobile"/><category term="testing"/><category term="windows forms"/><category term="amazon"/><category term="food"/><category term="t4"/><category term="twitter"/><category term="android"/><category term="balsamiq"/><category term="communication"/><category term="everything100%off"/><category term="goingoutofbusiness"/><category term="history"/><category term="ie"/><category term="law"/><category term="linq"/><category term="moving"/><category term="norway"/><category term="office"/><category term="photography"/><category term="scrum"/><category term="security"/><category term="webservice"/><category term="wf"/><category term="xml"/><title type='text'>mo.notono.us</title><subtitle type='html'>&lt;b&gt;mo.notono.us&lt;/b&gt; (mə-nŏt&lt;b&gt;&#39;&lt;/b&gt;n-əs)&lt;br&gt;&#xa;&lt;i&gt;adj.&lt;/i&gt;&lt;br&gt;&#xa;Tediously repetitious or lacking in variety.&lt;br&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mo.notono.us/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/-/moss'/><link rel='alternate' type='text/html' href='http://mo.notono.us/search/label/moss'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/-/moss/-/moss?start-index=26&amp;max-results=25'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>61</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5655646.post-7700170735731187258</id><published>2009-12-04T00:21:00.001-05:00</published><updated>2009-12-04T00:24:40.397-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint2010"/><title type='text'>Getting the ContentType from an ItemAdding Event Handler</title><content type='html'>&lt;p&gt;Inside an event handler for an ItemAdded event, getting the List Item’s ContentType is as easy as &lt;/p&gt;  &lt;pre style=&quot;width: 481px; height: 30px&quot; class=&quot;code&quot;&gt;var contentType = properties.ListItem.ContentType;&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;However, for ItemAdding, properties.ListItem is null.&lt;/p&gt;

&lt;p&gt;Luckily, the ContentType name and Id are part of the properties.AfterProperties collection – the following will work: &lt;/p&gt;

&lt;pre style=&quot;width: 473px; height: 102px&quot; class=&quot;code&quot;&gt;SPList list = properties.List; 
string contentTypeName = properties.AfterProperties[&amp;quot;ContentType&amp;quot;].ToString(); 
SPContentType contentType = list.ContentTypes[contentTypeName]; 
SPFieldCollection fields = contentType.Fields;&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Between the AfterProperties field values and the content type field collection, you typically have all that you need... Just remember to not depend on properties.ListItem.&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/7700170735731187258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/7700170735731187258' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/7700170735731187258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/7700170735731187258'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/12/getting-contenttype-from-itemadding.html' title='Getting the ContentType from an ItemAdding Event Handler'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-4694880571262843836</id><published>2009-11-09T22:28:00.001-05:00</published><updated>2009-11-17T15:15:49.561-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="errors"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="windows7"/><title type='text'>SharePoint Office Server 2010, on Windows 7, in Google Chrome</title><content type='html'>&lt;div class=&quot;ExternalClass09094F25BA594BAA9BF57299A4D177E6&quot;&gt;   &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuQx-DW-WBKy6J8sN02rRrgn_kymIPoTdpAwQPUjX64YVxK4G_7f3jKSoEqqYhhmWkgfga1fiTL1p4ZbWq0xY8WAdHBBmnQGDfUTrl76aJ1DIy0bNbc9YyumPzDqvCm7A7NAd_TA/s1600-h/image%5B4%5D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvbtUWWybNxudcBYhukxGGr0iwvKC-q6g7AAGeyAVNMwTNFV-h6nZ6F6ceAF_IHmntI_Dw-KkJ7dTBYVA4xrOvNOqGW79BshJLqNO9pG_bHs0GYXcyUKATP_8HXiaKQPfU8BiwXg/?imgmax=800&quot; width=&quot;444&quot; height=&quot;321&quot; /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;It took a few hours of downloading, a few hours of installing (with workarounds), but I now have &lt;strike&gt;SharePoint 2010 Office Server Beta (aka the MOSS upgrade) running on my Windows 7 laptop; and as can be seen, it renders beautifully in Google Chrome.&lt;/strike&gt;&lt;strong&gt; &amp;lt;UPDATE1&amp;gt;&lt;/strong&gt; installed and uninstalled the dang thing several times, with the same result:&amp;#160; I keep getting WCF errors: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;System.Configuration.ConfigurationErrorsException: Unrecognized attribute &#39;allowInsecureTransport&#39;. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strike&gt;&amp;lt;/UPDATE1&amp;gt;&lt;/strike&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;lt;UPDATE2&amp;gt;      &lt;br /&gt;&lt;/strong&gt;I completely uninstalled every bit of SharePoint 2010, Visual Studio 2010, .net 4, and every prerequisite of SP.&amp;#160; Then reinstalled.&amp;#160; This time I ran the configuration wizard (as admin) while connected to the domain controller (via vpn).&amp;#160; MOST of SP2010 now seems to work.&lt;/p&gt;  &lt;p&gt;I then tried adding the local SP admin account (hat I had created for my first install) to the Farm Administrators group.&amp;#160; Same damn WCF error.&lt;/p&gt;  &lt;p&gt;So I simply backed up then edited client.config to remove the offensive attribute both from line 57 and from a second instance on line 97.&amp;#160; Then I rebooted and tried the Farm Admin Addition again.&lt;/p&gt;  &lt;p&gt;Same error message (note that I am NOT running SPF, I am running the full Office Server version)…&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPRaOd3LyUatFFFrfXFEkuZyPkHs_ZqSo89ZG-C_GODy3902mnIBCtrgHQnjK_daO-qcBp4IJ8B1XiCwVQZXPAlTg66Dpx73xAX0feBzrm2IEKzDiN0yh533bCCuuNeSSHMgJwWA/s1600-h/image%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_LAFhrsywiS7VkHWGJvGaBXJJhsVupIqmPpj4B_LJAgaOUT0bg9fjnHtLp390UFygp_0HcSXIXVj4UFqZsxwLYfHWy8m7Nm8s3gttHZSmSafPcajJTfXgv-AkjhTzZnJiiPFoow/?imgmax=800&quot; width=&quot;424&quot; height=&quot;270&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;… but different cause this time:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Local administrator privilege is required to update the Farm Administrators&#39; group.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font color=&quot;#666666&quot;&gt;Could this be a limitation of running SharePoint2010 on Windows 7?      &lt;br /&gt;&lt;/font&gt;&lt;strong&gt;&amp;lt;/UPDATE2&amp;gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strike&gt;The one&lt;/strike&gt; Another challenge of the installation was that the Configuration wizard would fail repeatedly on step 2 (of 10) when attempting to set up the configuration database.&amp;#160; The error was “user can not be found”.&amp;#160; I then noticed that my domain account did not have full admin rights on my SQL server instance, unless I started SQL Management Studio as Run as Admin.&lt;/p&gt;  &lt;p&gt;The workaround I used was to create a local admin account, grant that account full db access, switch to the new admin account, run the configuration wizard, and then switch back to my regular user account.&amp;#160; Crude, but effective.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;lt;UPDATE2&amp;gt;      &lt;br /&gt;&lt;/strong&gt;The better alternative is to connect to your corporate network to gain access to your domain controller.&amp;#160; On my 3rd, 4th and 5th (!) time running the configuration wizard, this was the approach I took, and it seems to work well.&amp;#160; (I understand this is also something that is necessary for the VS 2010 TFS install&lt;strong&gt;.)&amp;lt;/UPDATE2&amp;gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I have no opinions on speed, etc – more of that to come, I’m sure.&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;/div&gt;  &lt;p&gt;&lt;strong&gt;&amp;lt;UPDATE3&amp;gt;     &lt;br /&gt;&lt;/strong&gt;So I finally ended up scrapping Windows 7 &lt;em&gt;AND&lt;/em&gt; 2008 R2.&amp;#160; With our code, there just was no getting around compatibility issues.&amp;#160; So for now I am running on good ol’ Windows Server 2008 x64.&lt;/p&gt;  &lt;p&gt;Can’t wait for MS to release bootable, sysprepped developer vhds for this...   &lt;br /&gt;&lt;strong&gt;&amp;lt;/UPDATE3&amp;gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/4694880571262843836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/4694880571262843836' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4694880571262843836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4694880571262843836'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/11/sharepoint-office-server-2010-on.html' title='SharePoint Office Server 2010, on Windows 7, in Google Chrome'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvbtUWWybNxudcBYhukxGGr0iwvKC-q6g7AAGeyAVNMwTNFV-h6nZ6F6ceAF_IHmntI_Dw-KkJ7dTBYVA4xrOvNOqGW79BshJLqNO9pG_bHs0GYXcyUKATP_8HXiaKQPfU8BiwXg/s72-c?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-8734545189805926520</id><published>2009-11-04T10:26:00.001-05:00</published><updated>2009-11-04T10:26:29.726-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="advertising"/><category scheme="http://www.blogger.com/atom/ns#" term="errors"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="silliness"/><title type='text'>This is Business Productivity?</title><content type='html'>&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzUX-U5EZ5UXrQzwzcyCdimuE9iPKGAwKDJGJT35CLVSkfFahyphenhyphenbrnb0jItUWLYWbrN3byiv7-6e32UwcoQfjwMJpMeKBNVFooXA7EkctzDTEHGaO59YByUOS6tzpVUg94sOImVGg/s1600-h/image%5B5%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXSDNqc9Ez4UbwJkZnFpOijGGw79LYbFgEnMULlrLzfgkuqy6hpkJBmN1DYDHatd56mlENg3a6B3hElMV1dVpr0j0fDtqALdjdeQ2Rsc2Xq651lePIR0SkXJqfYQxTn9K1CJZVNg/?imgmax=800&quot; width=&quot;404&quot; height=&quot;319&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Really, Microsoft?&amp;#160; This is the appropriate stock-photo for business productivity? &lt;/p&gt;  &lt;p&gt;Are they productive because they are wearing suits?&lt;/p&gt;  &lt;p&gt;Are they watching other people work productively?&lt;/p&gt;  &lt;p&gt;Is the business being productive without them?&lt;/p&gt;  &lt;p&gt;Did they just finish being productive and are now basking in the glow of their success?&lt;/p&gt;  &lt;p&gt;(from &lt;a title=&quot;http://go.microsoft.com/?linkid=9690494&quot; href=&quot;http://go.microsoft.com/?linkid=9690494&quot;&gt;http://go.microsoft.com/?linkid=9690494&lt;/a&gt;)&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/8734545189805926520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/8734545189805926520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/8734545189805926520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/8734545189805926520'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/11/this-is-business-productivity.html' title='This is Business Productivity?'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXSDNqc9Ez4UbwJkZnFpOijGGw79LYbFgEnMULlrLzfgkuqy6hpkJBmN1DYDHatd56mlENg3a6B3hElMV1dVpr0j0fDtqALdjdeQ2Rsc2Xq651lePIR0SkXJqfYQxTn9K1CJZVNg/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-1924904494098090803</id><published>2009-09-19T20:31:00.001-05:00</published><updated>2009-09-19T20:31:55.334-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="experiment"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><title type='text'>Mimicking Outlook 2010’s Conversation View in Outlook 2007</title><content type='html'>&lt;p&gt;One of Outlook 2010 (and Gmail)’s better features is that conversations are grouped together – that is: if you send me a message, and I reply, and you reply again, all three messages are grouped together – not just the two you sent me.&lt;/p&gt;  &lt;p&gt;The latter is what Outlook 2007 considers a “conversation” – I’d call it a monologue, or at best half a conversation.&lt;/p&gt;  &lt;p&gt;To get the full duplex conversation thread in Outlook 2007 do the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Right-click Search Folders, select new Search Folder&lt;/li&gt;    &lt;li&gt;In the New Search Folder dialog, scroll all the way to the bottom, and select Create a custom Search Folder, then click the Choose.. button.&lt;/li&gt;    &lt;li&gt;In the Custom Search Folder dialog, enter a name that makes sense to you – I’ll call it Inbox2.0 - SKIP THE CRITERIA, then click Browse… to select which folders to include.&lt;/li&gt;    &lt;li&gt;In the Select Folder(s) dialog, select the Inbox and Sent Items folders (and any subfolders/other folders that may make sense for your setup), then click OK&lt;/li&gt;    &lt;li&gt;Back in the Custom Search Folder dialog, click OK&lt;/li&gt;    &lt;li&gt;Outlook will present a warning that all items in the folders will be included – this is precisely what you want, so click Yes&lt;/li&gt;    &lt;li&gt;Your new (Inbox2.0) folder will appear listing all received and sent messages&lt;/li&gt;    &lt;li&gt;From the View menu, select Arrange By, Conversation – now your messages are threaded by conversation – the full duplex kind.&lt;/li&gt;    &lt;li&gt;From here, you may chose to remove/insert colums (I like to show the &#39;To&#39; recipient and remove the &#39;In Folder&#39;, and also the &#39;Subject&#39; column – it is (mostly) a duplicate of the conversation title.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Enjoy your new duplex view.&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/1924904494098090803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/1924904494098090803' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/1924904494098090803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/1924904494098090803'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/09/mimicking-outlook-2010s-conversation.html' title='Mimicking Outlook 2010’s Conversation View in Outlook 2007'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-4864777198066335460</id><published>2009-07-31T13:28:00.001-05:00</published><updated>2009-07-31T13:28:19.758-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="asp.net mvc"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="experiment"/><category scheme="http://www.blogger.com/atom/ns#" term="me-me-me"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="mvc"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><title type='text'>ASP.NET MVC: TagBuilder Extension Methods</title><content type='html'>&lt;p&gt;I wasn’t happy with the TagBuilder class, so I improved it… See &lt;a href=&quot;http://gist.github.com/159291&quot; target=&quot;_blank&quot;&gt;gist&lt;/a&gt; below:&lt;/p&gt; &lt;script src=&quot;http://gist.github.com/159291.js&quot;&gt;&lt;/script&gt;  &lt;p&gt;This kind of thing could be useful in MOSS WebPart development as well…&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/4864777198066335460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/4864777198066335460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4864777198066335460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4864777198066335460'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/07/aspnet-mvc-tagbuilder-extension-methods.html' title='ASP.NET MVC: TagBuilder Extension Methods'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-823479558355690790</id><published>2009-06-04T10:49:00.001-05:00</published><updated>2009-06-04T10:52:01.883-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="me-me-me"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>My contributions to SPExLib</title><content type='html'>&lt;p&gt;I just discovered &lt;a href=&quot;http://www.wictorwilen.se/&quot; target=&quot;_blank&quot;&gt;Wictor Wilen&lt;/a&gt; (&lt;a title=&quot;SharePoint Extension Library People&quot; href=&quot;http://spexlib.codeplex.com/People/ProjectPeople.aspx&quot; target=&quot;_blank&quot;&gt;et al&lt;/a&gt;)’s excellent &lt;a title=&quot;SharePoint Extensions Lib - CodePlex&quot; href=&quot;http://spexlib.codeplex.com&quot; target=&quot;_blank&quot;&gt;CodePlex project: SharePoint Extensions Lib&lt;/a&gt;, which aims to simplify SharePoint development on .NET 3.5 SP1 and up.&lt;/p&gt;  &lt;p&gt;Since I never took the time to figure out how exactly to contribute directly to a CodePlex project, I instead first did &lt;a title=&quot;My Ad-hoc Contributions thread on SpExLib&amp;#39;s discussions list&quot; href=&quot;http://spexlib.codeplex.com/Thread/View.aspx?ThreadId=58462&quot; target=&quot;_blank&quot;&gt;an ad-hoc contribution&lt;/a&gt; of my (or &lt;a title=&quot;Efficient way to add a new item to a SharePoint list - Rob Garrett&quot; href=&quot;http://blog.robgarrett.com/2009/02/25/efficient-way-to-add-a-new-item-to-a-sharepoint-list/&quot; target=&quot;_blank&quot;&gt;rather Rob Garrett’s really&lt;/a&gt;) &lt;a title=&quot;Beware of SPList.Items.Add() - mo.notono.us&quot; href=&quot;http://mo.notono.us/2009/03/beware-of-splistitemsadd.html&quot; target=&quot;_blank&quot;&gt;SPlist.AddItemOptimized()&lt;/a&gt; method.&amp;#160; I then quickly went through the methods that are there so far in SPExLib, and culled from my own library those that overlapped.&amp;#160; Below is the filtered result: these are extension methods not currently in the SPExlib project (as of June 04 2009).&lt;/p&gt;  &lt;pre style=&quot;font-size: 7pt; overflow-y: show;&quot; class=&quot;code&quot;&gt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace SPExLib.SharePoint
{
  #region Site Extensions
  /// &amp;lt;summary&amp;gt;
  /// SPSite Extension Methods
  /// &amp;lt;/summary&amp;gt;
  public static class SiteExtensions
  {

    /// &amp;lt;summary&amp;gt;
    /// Gets a built in site field (column).
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;site&amp;quot;&amp;gt;The site.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;builtInFieldId&amp;quot;&amp;gt;The built in field id.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;The Built In &amp;lt;see cref=&amp;quot;SPField&amp;quot;/&amp;gt;.&amp;lt;/returns&amp;gt;
    public static SPField GetBuiltInField(this SPSite site, Guid builtInFieldId)
    {

      return site.RootWeb.Fields[builtInFieldId];
    }

    /// &amp;lt;summary&amp;gt;
    /// Gets a &amp;lt;see cref=&amp;quot;List{SPList}&amp;quot;/&amp;gt; of all lists contained within the site collection, including those in the root web and all the sub sites.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;site&amp;quot;&amp;gt;The site.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;A &amp;lt;see cref=&amp;quot;List{SPList}&amp;quot;/&amp;gt; containing all the lists.&amp;lt;/returns&amp;gt;
    public static List&amp;lt;SPList&amp;gt; GetAllLists(this SPSite site)
    {
      List&amp;lt;SPList&amp;gt; allLists = new List&amp;lt;SPList&amp;gt;();
      for (int i = 0; i &amp;lt; site.AllWebs.Count; i++)
      {
        using (SPWeb web = site.AllWebs[i])
        {
          allLists.AddRange(web.Lists.Cast&amp;lt;SPList&amp;gt;());
        }
      }
      return allLists;
    }
  }
  #endregion

  #region Web Extensions
  /// &amp;lt;summary&amp;gt;
  /// Extensions to the SPWeb class
  /// &amp;lt;/summary&amp;gt;
  public static class WebExtensions
  {
    /// &amp;lt;summary&amp;gt;
    /// Gets the relative URL of the web.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;web&amp;quot;&amp;gt;The web.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;The Url of the web, relative to the site.&amp;lt;/returns&amp;gt;
    public static string GetRelativeUrl(this SPWeb web)
    {
      string siteUrl = web.Site.Url;
      string webUrl = web.Url;
      if (webUrl.Contains(siteUrl))
        return webUrl.Replace(siteUrl, &amp;quot;&amp;quot;);
      return null;

    }


    /// &amp;lt;summary&amp;gt;
    /// Gets the list from the list&#39;s URL, relative to the Web (which is the url used to create the list).
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;web&amp;quot;&amp;gt;The web.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;listUrl&amp;quot;&amp;gt;The list URL, relative to the web (equals the url used to create the list).&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;A &amp;lt;see cref=&amp;quot;SPList&amp;quot;/&amp;gt; instance, or null, if the list was not found.&amp;lt;/returns&amp;gt;
    public static SPList GetListFromListUrl(this SPWeb web, string listUrl)
    {
      SPList result = null;
      listUrl = string.Format(&amp;quot;{0}/{1}&amp;quot;, web.Url, listUrl);
      try
      {
        result = web.GetList(listUrl);
      }
      catch { }
      return result;
    }
  }
  #endregion

  #region SPList Extensions
  /// &amp;lt;summary&amp;gt;
  /// SPList Extension Methods
  /// &amp;lt;/summary&amp;gt;
  public static class ListExtensions
  {
    /// &amp;lt;summary&amp;gt;
    /// Adds a content type to the list, optionally adding the content type fields to the default view for the list.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;list&amp;quot;&amp;gt;The list.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentType&amp;quot;&amp;gt;The content type.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;addColumnsToDefaultView&amp;quot;&amp;gt;if set to &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; add columns to the list&#39;s default view.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;The &amp;lt;see cref=&amp;quot;SPContentType&amp;quot;/&amp;gt; instance.&amp;lt;/returns&amp;gt;
    public static SPContentType AddContentType(this SPList list, SPContentType contentType, bool addColumnsToDefaultView)
    {
      if (contentType == null || list.ContentTypes.ContainsContentType(contentType.Id))
        return contentType;

      contentType = list.ContentTypes.Add(contentType);
      if (addColumnsToDefaultView)
      {
        bool viewUpdated = false;
        SPView defaultView = list.DefaultView;
        //SPViewFieldCollection viewFields = list.DefaultView.ViewFields;
        //Add content type fields (but only those not hidden, and also not ContentType and Title)
        foreach (SPField field in contentType.Fields)
        {
          if (!defaultView.ViewFields.Contains(field.InternalName)
            &amp;amp;&amp;amp; !field.Hidden &amp;amp;&amp;amp; !contentType.FieldLinks[field.Id].Hidden
            &amp;amp;&amp;amp; !&amp;quot;|Title|ContentType|Name|&amp;quot;.Contains(field.InternalName)
            )
          {
            defaultView.ViewFields.Add(field);
            viewUpdated = true;
          }
        }
        if (viewUpdated)
        {
          defaultView.DefaultView = true;
          defaultView.Update();
        }
      }
      list.Update();
      return contentType;
    }
  #endregion
    #region SPDocumentLibrary

    /// &amp;lt;summary&amp;gt;
    /// Adds the content type to the document library, optionally adding the content type fields to the default view for the list.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;documentLibrary&amp;quot;&amp;gt;The document library.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentType&amp;quot;&amp;gt;The content type.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;addColumnsToDefaultView&amp;quot;&amp;gt;if set to &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; [add columns to default view].&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;The &amp;lt;see cref=&amp;quot;SPContentType&amp;quot;/&amp;gt; instance.&amp;lt;/returns&amp;gt;
    public static SPContentType AddContentType(this SPDocumentLibrary documentLibrary, SPContentType contentType, bool addColumnsToDefaultView)
    {
      return ((SPList)documentLibrary).AddContentType(contentType, addColumnsToDefaultView);
    }
    #endregion
    #region SPListCollection
    /// &amp;lt;summary&amp;gt;
    /// Creates a list based on the specified title, description, URL, Feature ID, template type, document template type, and options for displaying a link to the list in Quick Launch.
    /// Overloads and corrects the parameter types of the default Add method
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;listCollection&amp;quot;&amp;gt;The list collection.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;title&amp;quot;&amp;gt;The title.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;description&amp;quot;&amp;gt;The description.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;url&amp;quot;&amp;gt;The URL.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;featureId&amp;quot;&amp;gt;The feature id.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;templateType&amp;quot;&amp;gt;The template type.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;docTemplateType&amp;quot;&amp;gt;The doc template type.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;quickLaunchOptions&amp;quot;&amp;gt;The quick launch options.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;A GUID that identifies the new list.&amp;lt;/returns&amp;gt;
    public static Guid Add(this SPListCollection listCollection, string title, string description, string url, Guid featureId,
      SPListTemplateType templateType, int docTemplateType, SPListTemplate.QuickLaunchOptions quickLaunchOptions)
    {
      return listCollection.Add(title, description, url, featureId.ToString(&amp;quot;B&amp;quot;).ToUpper(),
        (int)templateType, docTemplateType.ToString(), quickLaunchOptions);
    }
    #endregion
    #region SPViewFieldCollection
    /// &amp;lt;summary&amp;gt;
    /// Determines whether the view field collection contains a field of the specified internal name.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;viewFieldCollection&amp;quot;&amp;gt;The view field collection.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;internalFieldName&amp;quot;&amp;gt;Internal name of the  field.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;
    ///   &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; if the view field collection contains the field; otherwise, &amp;lt;c&amp;gt;false&amp;lt;/c&amp;gt;.
    /// &amp;lt;/returns&amp;gt;
    public static bool Contains(this SPViewFieldCollection viewFieldCollection, string internalFieldName)
    {
      return viewFieldCollection.Cast&amp;lt;string&amp;gt;().Any(f =&amp;gt; f == internalFieldName);
    }

    /// &amp;lt;summary&amp;gt;
    /// Adds a specified field to the collection.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;col&amp;quot;&amp;gt;The collection.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;fieldGuid&amp;quot;&amp;gt;The field&#39;s Guid.&amp;lt;/param&amp;gt;
    public static void Add(this SPViewFieldCollection col, Guid fieldGuid)
    {
      col.Add(col.View.ParentList.Fields[fieldGuid]);
    }

    /// &amp;lt;summary&amp;gt;
    /// Deletes the specified field from the collection.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;col&amp;quot;&amp;gt;The collection.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;fieldGuid&amp;quot;&amp;gt;The field&#39;s Guid.&amp;lt;/param&amp;gt;
    public static void Delete(this SPViewFieldCollection col, Guid fieldGuid)
    {
      col.Delete(col.View.ParentList.Fields[fieldGuid]);
    }

  }
    #endregion

  #region SPContentType (and related classes) extensions
  /// &amp;lt;summary&amp;gt;
  /// SPContentType and related class extensions
  /// &amp;lt;/summary&amp;gt;
  public static class ContentTypeExtensions
  {
    #region SPFieldLinkCollection Extensions
    /// &amp;lt;summary&amp;gt;
    /// Adds a field to the &amp;lt;see cref=&amp;quot;SPFieldLinkCollection&amp;quot;/&amp;gt;.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;fieldLinkCollection&amp;quot;&amp;gt;The field link collection.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;field&amp;quot;&amp;gt;The field.&amp;lt;/param&amp;gt;
    public static void AddField(this SPFieldLinkCollection fieldLinkCollection, SPField field)
    {
      fieldLinkCollection.Add(new SPFieldLink(field));
    }

    /// &amp;lt;summary&amp;gt;
    /// Clears the fields in a &amp;lt;see cref=&amp;quot;SPFieldLinkCollection&amp;quot;/&amp;gt;.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;fieldLinkCollection&amp;quot;&amp;gt;The field link collection.&amp;lt;/param&amp;gt;
    public static void ClearFields(this SPFieldLinkCollection fieldLinkCollection)
    {
      for (int i = fieldLinkCollection.Count - 1; i &amp;gt;= 0; i--)
      {
        fieldLinkCollection.Delete(fieldLinkCollection[i].Id);
      }

    }
    #endregion

    #region SPContentType Extensions
    /// &amp;lt;summary&amp;gt;
    /// Adds a field link to the &amp;lt;see cref=&amp;quot;SPContentType&amp;quot;/&amp;gt;.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentType&amp;quot;&amp;gt;The content type.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;field&amp;quot;&amp;gt;The field.&amp;lt;/param&amp;gt;
    public static void AddFieldLink(this SPContentType contentType, SPField field)
    {
      contentType.FieldLinks.Add(new SPFieldLink(field));
    }

    /// &amp;lt;summary&amp;gt;
    /// First clears the field links collection from the content type, then re-adds all Parent content type field links.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentType&amp;quot;&amp;gt;The content type.&amp;lt;/param&amp;gt;
    public static void ResetFieldLinks(this SPContentType contentType)
    {
      contentType.FieldLinks.ClearFields();
      foreach (SPFieldLink fl in contentType.Parent.FieldLinks)
      {
        contentType.FieldLinks.Add(fl);
      }
    }


    /// &amp;lt;summary&amp;gt;
    /// Clears the event receivers from the content type.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentType&amp;quot;&amp;gt;The content type.&amp;lt;/param&amp;gt;
    public static void ResetEventReceivers(this SPContentType contentType)
    {
      for (int i = contentType.EventReceivers.Count - 1; i &amp;gt;= 0; i--)
      {
        contentType.EventReceivers[i].Delete();
      }
      //TODO: Does a content type inherit it&#39;s parent content type receiver?
      //contentType.EventReceivers = contentType.Parent.EventReceivers;
    }

    #endregion

    #region SPContentTypeCollection Extensions
    /// &amp;lt;summary&amp;gt;
    /// Determines whether the &amp;lt;see cref=&amp;quot;SPContentTypeCollection&amp;quot;/&amp;gt; contains a content type with the specified name.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentTypeCollection&amp;quot;&amp;gt;The content type collection.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;name&amp;quot;&amp;gt;The name.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;
    ///   &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; if the content type collection contains a content type with the specified name; otherwise, &amp;lt;c&amp;gt;false&amp;lt;/c&amp;gt;.
    /// &amp;lt;/returns&amp;gt;
    public static bool Contains(this SPContentTypeCollection contentTypeCollection, string name)
    {
      //return contentTypeCollection.Cast&amp;lt;SPContentType&amp;gt;().Any(ct =&amp;gt; ct.Name == name);
      return (contentTypeCollection[name] != null);
    }

    /// &amp;lt;summary&amp;gt;
    /// Determines whether the content type collection contains a content type with the specified &amp;lt;see cref=&amp;quot;SPContentTypeId&amp;quot;/&amp;gt;.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentTypeCollection&amp;quot;&amp;gt;The content type collection.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentTypeID&amp;quot;&amp;gt;The content type ID.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;
    ///   &amp;lt;c&amp;gt;true&amp;lt;/c&amp;gt; if the content type collection contains a content type with the specified &amp;lt;see cref=&amp;quot;SPContentTypeId&amp;quot;/&amp;gt;; otherwise, &amp;lt;c&amp;gt;false&amp;lt;/c&amp;gt;.
    /// &amp;lt;/returns&amp;gt;
    public static bool ContainsContentType(this SPContentTypeCollection contentTypeCollection, SPContentTypeId contentTypeID)
    {
      //old way
      //for (int i=0; i &amp;lt; contentTypeCollection.Count; i++)
      //{
      //  if (contentTypeCollection[i].Id == contentTypeID)
      //    return true;
      //}
      //return false;

      //new cool way:
      //return contentTypeCollection.Cast&amp;lt;SPContentType&amp;gt;().Any(ct =&amp;gt; ct.Id == contentTypeID);

      //simple way
      return (contentTypeCollection[contentTypeID] != null);
    }

    /// &amp;lt;summary&amp;gt;
    /// Deletes a sealed content type by unsealing and un-readonly-ing the content type before attempting to delete it.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;contentTypeCollection&amp;quot;&amp;gt;The content type collection.&amp;lt;/param&amp;gt;
    /// &amp;lt;param name=&amp;quot;name&amp;quot;&amp;gt;The name.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;
    public static bool DeleteSealedContentType(this SPContentTypeCollection contentTypeCollection, string name)
    {
      bool success = false;
      try
      {
        SPContentType contentType = contentTypeCollection[name];
        contentType.Sealed = false;
        contentType.ReadOnly = false;
        contentTypeCollection.Delete(contentType.Id);
        success = !contentTypeCollection.ContainsContentType(contentType.Id);
      }
      catch { }
      return success;
    }

    #endregion
  }
  #endregion

  /// &amp;lt;summary&amp;gt;
  /// Extension methods for SPFile
  /// &amp;lt;/summary&amp;gt;
  public static class SPFileExtensions
  {

    /// &amp;lt;summary&amp;gt;
    /// Gets the file size as string.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;param name=&amp;quot;file&amp;quot;&amp;gt;The file.&amp;lt;/param&amp;gt;
    /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;
    public static string GetFileSizeAsString(this SPFile file)
    {
      double s = file.Length;
      string[] format = new string[] { &amp;quot;{0} bytes&amp;quot;, &amp;quot;{0} KB&amp;quot;, &amp;quot;{0} MB&amp;quot;, &amp;quot;{0} GB&amp;quot;, &amp;quot;{0} TB&amp;quot;, &amp;quot;{0} PB&amp;quot;, &amp;quot;{0} EB&amp;quot;, &amp;quot;{0} ZB&amp;quot;, &amp;quot;{0} YB&amp;quot; };
      int i = 0;
      while (i &amp;lt; format.Length - 1 &amp;amp;&amp;amp; s &amp;gt;= 1024)
      {
        s = (int)(100 * s / 1024) / 100.0;
        i++;
      }
      return string.Format(format[i], s.ToString(&amp;quot;###,###,###.##&amp;quot;));
    }
  }
}&lt;/pre&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/823479558355690790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/823479558355690790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/823479558355690790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/823479558355690790'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/06/my-contributions-to-spexlib.html' title='My contributions to SPExLib'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-6508810792273846202</id><published>2009-05-21T08:53:00.001-05:00</published><updated>2009-05-21T08:53:43.106-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="design"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="silverlight"/><title type='text'>Looking through the source of SharePoint on SharePoint</title><content type='html'>&lt;p&gt;Microsoft launched &lt;a href=&quot;http://sharepoint.microsoft.com&quot; target=&quot;_blank&quot;&gt;their new SharePoint site&lt;/a&gt; &lt;a href=&quot;http://blogs.msdn.com/sharepoint/archive/2009/05/20/sharepoint-on-sharepoint-launch-of-new-sharepoint-website.aspx&quot; target=&quot;_blank&quot;&gt;a few days ago&lt;/a&gt;, and for the first time the SharePoint site is actually hosted on SharePoint (!).&amp;#160; It’s a nice looking site, with a dynamic user interface, courtesy of AJAX and Silverlight.&amp;#160; I decided to take a closer look at the visible source code – that is, the rendered HTML, JS, CSS, and Xap files.&lt;/p&gt;  &lt;p&gt;Below are some observations:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;They’re first loading the OOTB stylesheets, including HTML Editor and core.css (all 4K+ lines of it), completely unmodified, then they override the defaults with additional stylesheets (the MSCOMP_Core.css is another 4K+ lines of css) – seems inefficient? &lt;/li&gt;    &lt;li&gt;They only load Core.js if authenticated, through a custom server control:      &lt;br /&gt;&lt;font size=&quot;1&quot; face=&quot;Courier&quot;&gt;&amp;lt;!-- RegisterCoreJSIfAuthenticated web server control --&amp;gt;        &lt;br /&gt;&amp;lt;span id=&amp;quot;ctl00_RegisterCoreJsIfAuthenticated1&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;Interestingly MS uses Webtrends &lt;/li&gt;    &lt;li&gt;They use custom js to get around the name dll:      &lt;br /&gt;&lt;font size=&quot;1&quot; face=&quot;Courier&quot;&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/_catalogs/masterpage/remove_name_dll_prompt.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;There’s extensive Control look and feel customization through Control specific CSS &lt;/li&gt;    &lt;li&gt;A lot of their stylesheets reference slwp_something – &lt;b&gt;S&lt;/b&gt;ilver&lt;b&gt;L&lt;/b&gt;ight &lt;b&gt;W&lt;/b&gt;eb&lt;b&gt;P&lt;/b&gt;art perhaps? &lt;/li&gt;    &lt;li&gt;The viewstate looks pretty nasty but in the end is only 61KB, which I guess is acceptable &lt;/li&gt;    &lt;li&gt;The page includes the standard minified versions of MicrosoftAjax.js, MicrosoftAjaxWebForms.js, and SilverlightControl.js &lt;/li&gt;    &lt;li&gt;The on-page Silverlight initialization code is NASTY, not sure if this is standard for Silverlight, or if this is an ugly exception.&amp;#160; Why not use JSON?&amp;#160; Why use encoded javascript?&amp;#160; Here’s a very short random sample – note that they didn’t bother getting rid of spaces (%20) before encoding:      &lt;br /&gt;&lt;font size=&quot;1&quot; face=&quot;Courier&quot;&gt;SiteNavigationDefinition%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FChildSites%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2FSiteNavigationDefinition%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CSiteNavigationDefinition%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSelected%3Efalse%3C%2FSelected%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSiteName%3EECM%3C%2FSiteName%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3CSiteUrl%3E%2Fproduct%2Fcapabilities%2Fecm%2FPages%2Fdefault.aspx%3C%2FSiteUrl%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3C&lt;/font&gt;       &lt;br /&gt;Best of luck debugging that. &lt;/li&gt;    &lt;li&gt;There’s a mix of absolute and relative references to the same image library, (but that’s a very picky observation) &lt;/li&gt;    &lt;li&gt;YSlow result:&amp;#160; D, pinging it on number of HTTP requests, lack of a CDN (why doesn’t MS have a CDN?), Expirations headers, ETags and not minifying JS and CSS, but overall size is not bad for a MOSS page, especially not one this visually engaging – but then it turns out YSlow does not account for loading of Silverlight content – the Xap files for the Top Nav and main control are 240KB and 632KB, respectively:&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpRjiiTOfRWrMIAynRa5jqSee6lqdRbA6BD_cc_I6BGLgkxsfv7-g5-AVyj7igD1f0iWazQDYJSBwSwSl83lic9DZ4_Uos3kZsIbTEPpdoenfV-yIIzf2Dr0BQDAjlqs0vcVAecA/s1600-h/clip_image001%5B3%5D.jpg&quot; target=&quot;_blank&quot;&gt;        &lt;br /&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clip_image001&quot; border=&quot;0&quot; alt=&quot;clip_image001&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVqFP36bZ-DhPUZ6jwDdfa5JV3houQ0UaqLmi0miv_IZNAD1hRaWwE-W5AUnEGHKG63ueXD1UIvM-VG3F4E9kSA9JThDJflaXomEtensNprKSrwOlPhIN6J_24ACzTmLyINatF5A/?imgmax=800&quot; width=&quot;412&quot; height=&quot;134&quot; /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;The XAP files also contain some interesting content, like this test image for the header – but they’re not actually using &lt;a href=&quot;http://www.fastsearch.com/&quot; target=&quot;_blank&quot;&gt;fast&lt;/a&gt; for the search…       &lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGBhXS3NZupujZy4OIYW9JZqXxQNb1aOqmmpZceDqEiEyqve78fL-ryE_4D9G2eGDqEOtUJ_0ITRontEBssAiEbsR8DH-WtqmvZN0icpWgIFL2esC_QMsqVt1Io5kncmUREWY1NA/s1600-h/clip_image003%5B3%5D.jpg&quot; target=&quot;_blank&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;clip_image003&quot; border=&quot;0&quot; alt=&quot;clip_image003&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCHQPYeJexpl1ItNBpqO88R0HtaA9jUXXoyRu9-0C158ZXkO2LQcCjKXAzz4MuLn-Hl1yYjLtrkp6hDxlgvynLZ9MQUOorLFm0PVqLrlQDJzQt4wd4nyNQxxoeU8pqXzQ2pDqU8Q/?imgmax=800&quot; width=&quot;412&quot; height=&quot;68&quot; /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;They use an Image Transitioner component from &lt;a href=&quot;http://www.advaiya.com/&quot;&gt;Advaiya&lt;/a&gt; (sidenote – pure Silverlight websites are just as annoying as pure Flash websites), who has supported MS on other Silverlight initiatives – wonder if the SL pieces were outsourced to them? &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So – all in all a nice looking site, but I have some questions as to the completeness of the project.&amp;#160; Maybe it’s just me, but if I was Tony Tai (MS SharePoint Product Manager), I would spend another week finishing things up a bit…&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/6508810792273846202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/6508810792273846202' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/6508810792273846202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/6508810792273846202'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/05/looking-through-source-of-sharepoint-on.html' title='Looking through the source of SharePoint on SharePoint'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVqFP36bZ-DhPUZ6jwDdfa5JV3houQ0UaqLmi0miv_IZNAD1hRaWwE-W5AUnEGHKG63ueXD1UIvM-VG3F4E9kSA9JThDJflaXomEtensNprKSrwOlPhIN6J_24ACzTmLyINatF5A/s72-c?imgmax=800" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-7778199331206353777</id><published>2009-04-09T15:19:00.001-05:00</published><updated>2009-04-09T15:19:23.205-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="errors"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>SharePoint Bug: Send Welcome Email for External Users Points to Internal Url</title><content type='html'>&lt;p&gt;If you have extended a web application to an extranet or internet zone, and you add an external user to a group while logged in to the internal zone, then elect&amp;#160; to send the standard welcome email (see below), the resulting email will send links to the internal zone url, not the external zone that the users will need.&lt;/p&gt;  &lt;p&gt;This is a &lt;strong&gt;BUG&lt;/strong&gt;, or at best a VERY poorly designed feature... &lt;/p&gt;  &lt;p&gt;The problem exists in &lt;span style=&quot;white-space:nowrap&quot;&gt;Microsoft.SharePoint.ApplicationPages.AclInv.SendEmailInvitation()&lt;sup&gt;*&lt;/sup&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;One of the lines read: &lt;/p&gt;  &lt;pre style=&quot;width: 628px; height: 54px&quot; class=&quot;code&quot;&gt;&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String&quot;&gt;string&lt;/a&gt; &lt;strong&gt;urlToEncode&lt;/strong&gt; = base.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase/property:Web:Microsoft.SharePoint.SPWeb&quot;&gt;Web&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPWeb/property:Url:String&quot;&gt;Url&lt;/a&gt; + &amp;quot;/_layouts/people.aspx?MembershipGroupId=&amp;quot; 
  + &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.Utilities.SPHttpUtility&quot;&gt;SPHttpUtility&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.Utilities.SPHttpUtility/UrlKeyValueEncode(String):String&quot;&gt;UrlKeyValueEncode&lt;/a&gt;(&lt;a&gt;byID&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPMember/property:ID:Int32&quot;&gt;ID&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Int32/ToString():String&quot;&gt;ToString&lt;/a&gt;());&lt;/pre&gt;

&lt;p&gt;The problem, of course is that base.Web will be the web that the current user is in, not the web that the extranet user will have rights to. &lt;/p&gt;

&lt;p&gt;Other than replacing/editing the AclInv.aspx page in Layouts I don&#39;t see any way this can be fixed.&amp;#160; Given that &lt;a title=&quot;MS TechNet: Welcome email uses internal servername&quot; href=&quot;http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/9b7ba411-5c8b-457e-9117-1087f8ae795c&quot; target=&quot;_blank&quot;&gt;this thread&lt;/a&gt; has been out here for more than two years I hold little hope that MS will fix the issue any time soon... &lt;/p&gt;

&lt;p&gt;(*locate the dll in C:\inetpub\wwwroot\wss\Virtual Directories\&amp;lt;your site&amp;gt;\_app_bin and reflect away...)&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/7778199331206353777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/7778199331206353777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/7778199331206353777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/7778199331206353777'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/04/sharepoint-bug-send-welcome-email-for.html' title='SharePoint Bug: Send Welcome Email for External Users Points to Internal Url'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-9111739974733785996</id><published>2009-04-09T12:12:00.001-05:00</published><updated>2009-04-09T14:03:01.114-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="me-me-me"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>C#: Generate Readable Passwords</title><content type='html'>&lt;p&gt;On a recent project I found it necessary to replace the &lt;a title=&quot;My delicious FBA bookmarks&quot; href=&quot;http://delicious.com/austegard/fba&quot; target=&quot;_blank&quot;&gt;Forms Based Authentication&lt;/a&gt; &lt;a title=&quot;MSDN: Membership Providers&quot; href=&quot;http://msdn.microsoft.com/en-us/library/aa478949.aspx&quot; target=&quot;_blank&quot;&gt;Membership provider&lt;/a&gt; generated passwords with some of my own choosing, in order to make the passwords actually readable and typeable.&amp;#160; Call me a usability-nut, but I consider passwords like &lt;em style=&quot;white-space: nowrap&quot;&gt;t7(N4(Jm9{]M@@&lt;/em&gt; and &lt;em style=&quot;white-space: nowrap&quot;&gt;|NxXl&amp;amp;^ah;z4]-&lt;/em&gt; (both actual &lt;a title=&quot;MSDN: MembershipUser.ResetPassword Method ()&quot; href=&quot;http://msdn.microsoft.com/en-us/library/d94bdzz2(VS.80).aspx&quot; target=&quot;_blank&quot;&gt;ResetPassword()&lt;/a&gt; result examples) to be neither readable nor typeable. &lt;/p&gt;  &lt;p&gt;So I followed &lt;a title=&quot;bytes.com: Re: How to reset user&amp;#39;s password without having to use PasswordRecovery&quot; href=&quot;http://bytes.com/groups/net-asp/689452-how-reset-users-password-without-having-use-passwordrecovery#post2740740&quot; target=&quot;_blank&quot;&gt;Mark Fitzpatrick&#39;s approach&lt;/a&gt;, which essentially is to take the output of the ResetPassword method and use it as the old password input for the &lt;a title=&quot;MSDN: MembershipUser.ChangePassword Method&quot; href=&quot;http://msdn.microsoft.com/en-us/library/system.web.security.membershipuser.changepassword(VS.80).aspx&quot; target=&quot;_blank&quot;&gt;ChangePassword&lt;/a&gt; method. But now I still needed a new password, so since nothing came out of a cursory Google search, I concocted the utility method below. Note that this is neither rocket surgery nor particularly brainy science and it may not suit your purpose, but it generates a random 9-10 character password from a set of 1.5+ million, which did the trick for me:&lt;/p&gt;  &lt;p&gt;&lt;s&gt;&lt;em&gt;&lt;strong&gt;UPDATE: &lt;/strong&gt;&lt;a title=&quot;Matthew Cochran: Random isn&amp;#39;t Really Random -- C# Random Number Generation&quot; href=&quot;http://www.c-sharpcorner.com/UploadFile/rmcochran/random07172006175425PM/random.aspx&quot; target=&quot;_blank&quot;&gt;The random number generator in .NET isn’t all that random&lt;/a&gt;, unless you force it to be – see&amp;#160; GetRandomIndex method at the bottom.&lt;/em&gt;&lt;/s&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;UPDATE 2&lt;/strong&gt;: Silly me – you have to apply the .Next() method of the SAME random instance, otherwise you end up with very recognizable patterns.&amp;#160; Removed the GetRandomIndex method and added _randomInstance member variable.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre style=&quot;height: 550px; font-size: 8pt&quot; class=&quot;code&quot;&gt;//Create a static instance of the Random class, on which to operate
private static Random _randomInstance = new Random();

/// &amp;lt;summary&amp;gt;
/// Generates a random, but readable, password, at least 8 characters and containing one or more 
/// lowercase and uppercase letters, numbers, and symbols.
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;returns&amp;gt;The random password&amp;lt;/returns&amp;gt;
internal static string GenerateReadablePassword()
{
  //simple short words
  string[] words = new string[40] {
&amp;quot;Rocket&amp;quot;, &amp;quot;Ship&amp;quot;, &amp;quot;Plane&amp;quot;, &amp;quot;Train&amp;quot;, &amp;quot;Boat&amp;quot;,
&amp;quot;Space&amp;quot;, &amp;quot;Earth&amp;quot;, &amp;quot;Venus&amp;quot;, &amp;quot;Mars&amp;quot;, &amp;quot;Moon&amp;quot;,
&amp;quot;Valley&amp;quot;, &amp;quot;Water&amp;quot;, &amp;quot;Land&amp;quot;, &amp;quot;Beach&amp;quot;, &amp;quot;Field&amp;quot;,
&amp;quot;Puppy&amp;quot;, &amp;quot;Kitten&amp;quot;, &amp;quot;Tiger&amp;quot;, &amp;quot;Turtle&amp;quot;, &amp;quot;Bird&amp;quot;,
&amp;quot;Texas&amp;quot;, &amp;quot;Maine&amp;quot;, &amp;quot;Kansas&amp;quot;, &amp;quot;Florida&amp;quot;, &amp;quot;Alaska&amp;quot;,
&amp;quot;Hand&amp;quot;, &amp;quot;Head&amp;quot;, &amp;quot;Foot&amp;quot;, &amp;quot;Wrist&amp;quot;, &amp;quot;Elbow&amp;quot;,
&amp;quot;Happy&amp;quot;, &amp;quot;Smile&amp;quot;, &amp;quot;Grin&amp;quot;, &amp;quot;Humor&amp;quot;, &amp;quot;Spirit&amp;quot;,
&amp;quot;Soccer&amp;quot;, &amp;quot;Cricket&amp;quot;, &amp;quot;Tennis&amp;quot;, &amp;quot;Bowling&amp;quot;, &amp;quot;Yummy&amp;quot;
};
  //alphabets: don&#39;t include those that can be misinterpreted for another letter/number
  string alphabets = &amp;quot;abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXY&amp;quot;;
  //numbers: exclude 0 (~= O or o), 1 (~= I, or l) and 2 (~= z)
  string numbers = &amp;quot;3456789&amp;quot;;
  //common symbols: no brackets, parentheses or slashes
  string symbols = &amp;quot;!@#$+=&amp;amp;*?&amp;quot;;

  //put the elements together in a random format, but don&#39;t stick an alphabet immediately after a word
  string[] formats = new string[18] {
&amp;quot;{1}{2}{3}{0}&amp;quot;, 
&amp;quot;{1}{2}{0}{3}&amp;quot;, &amp;quot;{2}{3}{1}{0}&amp;quot;, &amp;quot;{3}{0}{2}{1}&amp;quot;,
&amp;quot;{0}{2}{3}{1}&amp;quot;, &amp;quot;{1}{3}{0}{2}&amp;quot;, &amp;quot;{3}{1}{2}{0}&amp;quot;,
&amp;quot;{0}{2}{1}{3}&amp;quot;, &amp;quot;{1}{3}{2}{0}&amp;quot;, &amp;quot;{2}{0}{3}{1}&amp;quot;, &amp;quot;{3}{1}{0}{2}&amp;quot;,
&amp;quot;{0}{3}{1}{2}&amp;quot;, &amp;quot;{1}{0}{2}{3}&amp;quot;, &amp;quot;{2}{1}{3}{0}&amp;quot;, 
&amp;quot;{0}{3}{2}{1}&amp;quot;, &amp;quot;{1}{0}{3}{2}&amp;quot;, &amp;quot;{2}{1}{0}{3}&amp;quot;, &amp;quot;{3}{2}{1}{0}&amp;quot;
};

  //combine the elements
  string password = string.Format(GetRandomString(formats), //random format
    GetRandomString(words), //0
    GetRandomStringCharacter(alphabets), //1
    GetRandomStringCharacter(numbers), //2
    GetRandomStringCharacter(symbols) //3
  );

  //post fill the password with numbers as necessary
  while (password.Length &amp;lt; 8)
  {
    password += GetRandomStringCharacter(numbers);
  }

  return password;
}

/// &amp;lt;summary&amp;gt;
/// Gets the random string character.
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&amp;quot;inputString&amp;quot;&amp;gt;The input string.&amp;lt;/param&amp;gt;
/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;
private static char GetRandomStringCharacter(string inputString)
{
  return inputString[_randomInstance.Next(0, inputString.Length)];
}

/// &amp;lt;summary&amp;gt;
/// Gets the random string.
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&amp;quot;inputStringArray&amp;quot;&amp;gt;The input string array.&amp;lt;/param&amp;gt;
/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;
private static string GetRandomString(string[] inputStringArray)
{
  return inputStringArray[_randomInstance.Next(0, inputStringArray.Length)];
}&lt;/pre&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/9111739974733785996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/9111739974733785996' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/9111739974733785996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/9111739974733785996'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/04/c-generate-readable-passwords.html' title='C#: Generate Readable Passwords'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-1261824759414090821</id><published>2009-03-30T20:24:00.000-05:00</published><updated>2009-03-31T15:55:29.026-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="errors"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><title type='text'>Beware of SPList.Items.Add()</title><content type='html'>&lt;p&gt;What could possibly be wrong with this statement?&lt;/p&gt;  &lt;pre style=&quot;height: 25px&quot; class=&quot;code&quot;&gt;SPListItem myItem = myList.Items.Add();&lt;/pre&gt;

&lt;p&gt;This is what’s wrong with it – this is the innards of SPList.Items:&lt;/p&gt;

&lt;pre class=&quot;code&quot; style=&quot;height: 160px&quot;&gt;public virtual &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItemCollection&quot;&gt;SPListItemCollection&lt;/a&gt; &lt;b&gt;&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPList/property:Items:Microsoft.SharePoint.SPListItemCollection&quot;&gt;Items&lt;/a&gt;&lt;/b&gt;
{
    get
    {
        &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPQuery&quot;&gt;SPQuery&lt;/a&gt; &lt;b&gt;query&lt;/b&gt; = new &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPQuery/.ctor()&quot;&gt;SPQuery&lt;/a&gt;();
        &lt;a&gt;query&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPQuery/property:ViewAttributes:String&quot;&gt;ViewAttributes&lt;/a&gt; = &amp;quot;Scope=\&amp;quot;Recursive\&amp;quot;&amp;quot;;
        return this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPList/GetItems(Microsoft.SharePoint.SPQuery):Microsoft.SharePoint.SPListItemCollection&quot;&gt;GetItems&lt;/a&gt;(&lt;a&gt;query&lt;/a&gt;);
    }
}&lt;/pre&gt;

&lt;p&gt;That’s right, the entire collection, every single item, item is returned and then Add() is applied to the final SPListItemCollection instance, which results in an internal SPListItem constructor call:&lt;/p&gt;

&lt;pre class=&quot;code&quot; style=&quot;height: 105px&quot;&gt;public &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem&quot;&gt;SPListItem&lt;/a&gt; &lt;b&gt;&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItemCollection/Add(String,Microsoft.SharePoint.SPFileSystemObjectType,String):Microsoft.SharePoint.SPListItem&quot;&gt;Add&lt;/a&gt;&lt;/b&gt;(&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String&quot;&gt;string&lt;/a&gt; folderUrl, 
    &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPFileSystemObjectType&quot;&gt;SPFileSystemObjectType&lt;/a&gt; underlyingObjectType, &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String&quot;&gt;string&lt;/a&gt; leafName)
{
  return new &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/.ctor(Microsoft.SharePoint.SPListItemCollection,String,Microsoft.SharePoint.SPFileSystemObjectType,String)&quot;&gt;SPListItem&lt;/a&gt;(this, &lt;a&gt;folderUrl&lt;/a&gt;, &lt;a&gt;underlyingObjectType&lt;/a&gt;, &lt;a&gt;leafName&lt;/a&gt;);
}&lt;/pre&gt;

&lt;pre class=&quot;code&quot;&gt;internal &lt;b&gt;&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/.ctor(Microsoft.SharePoint.SPListItemCollection,String,Microsoft.SharePoint.SPFileSystemObjectType,String)&quot;&gt;SPListItem&lt;/a&gt;&lt;/b&gt;(&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItemCollection&quot;&gt;SPListItemCollection&lt;/a&gt; items, &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String&quot;&gt;string&lt;/a&gt; folderUrl, &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPFileSystemObjectType&quot;&gt;SPFileSystemObjectType&lt;/a&gt; underlyingObjectType, &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String&quot;&gt;string&lt;/a&gt; leafName)
{
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_ItemGuid:System.Guid&quot;&gt;m_ItemGuid&lt;/a&gt; = &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Guid&quot;&gt;Guid&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Guid/Empty&quot;&gt;Empty&lt;/a&gt;;
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_fsoType:Microsoft.SharePoint.SPFileSystemObjectType&quot;&gt;m_fsoType&lt;/a&gt; = &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPFileSystemObjectType&quot;&gt;SPFileSystemObjectType&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPFileSystemObjectType/Invalid&quot;&gt;Invalid&lt;/a&gt;;
    if (&lt;a&gt;underlyingObjectType&lt;/a&gt; != &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPFileSystemObjectType&quot;&gt;SPFileSystemObjectType&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPFileSystemObjectType/File&quot;&gt;File&lt;/a&gt;)
    {
        while (&lt;a&gt;underlyingObjectType&lt;/a&gt; != &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPFileSystemObjectType&quot;&gt;SPFileSystemObjectType&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPFileSystemObjectType/Folder&quot;&gt;Folder&lt;/a&gt;)
        {
            throw new &lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.ArgumentOutOfRangeException/.ctor(String)&quot;&gt;ArgumentOutOfRangeException&lt;/a&gt;(&amp;quot;underlyingObjectType&amp;quot;);
        }
    }
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_Items:Microsoft.SharePoint.SPListItemCollection&quot;&gt;m_Items&lt;/a&gt; = &lt;a&gt;items&lt;/a&gt;;
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_uiItemsUpdateVersion:UInt32&quot;&gt;m_uiItemsUpdateVersion&lt;/a&gt; = &lt;a&gt;items&lt;/a&gt;.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItemCollection/property:UpdateVersion:UInt32&quot;&gt;UpdateVersion&lt;/a&gt;;
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_iIndex:Int32&quot;&gt;m_iIndex&lt;/a&gt; = -1;
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_strNewFolderName:String&quot;&gt;m_strNewFolderName&lt;/a&gt; = &lt;a&gt;folderUrl&lt;/a&gt;;
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_fsoType:Microsoft.SharePoint.SPFileSystemObjectType&quot;&gt;m_fsoType&lt;/a&gt; = &lt;a&gt;underlyingObjectType&lt;/a&gt;;
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_strNewBaseName:String&quot;&gt;m_strNewBaseName&lt;/a&gt; = &lt;a&gt;leafName&lt;/a&gt;;
    this.&lt;a href=&quot;http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.SharePoint:12.0.0.0:71e9bce111e9429c/Microsoft.SharePoint.SPListItem/m_bNewItem:Boolean&quot;&gt;m_bNewItem&lt;/a&gt; = true;
}&lt;/pre&gt;

&lt;p&gt;So what should be used instead?&amp;#160; &lt;a title=&quot;Rob Garrett: Efficient way to add a new item to a SharePoint list&quot; href=&quot;http://robgarrett.com/cs/blogs/software/archive/2009/02/25/efficient-way-to-add-a-new-item-to-a-sharepoint-list.aspx&quot; target=&quot;_blank&quot;&gt;Rob Garrett suggests creating a new empty SPListItemCollection and adding to it&lt;/a&gt;, below is his method converted to an Extension method (and renamed to be more easily found):&lt;/p&gt;

&lt;pre class=&quot;code&quot; style=&quot;height: 105px&quot;&gt;public static SPListItem AddItemOptimized(this SPList list)
{
  const string EmptyQuery = &amp;quot;0&amp;quot;;
  SPQuery q = new SPQuery {Query = EmptyQuery};
  return list.GetItems(q).Add();
}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;(and no, neither Rob nor I have instrumented the difference between these two methods, but Reflector doesn’t lie…)&lt;/p&gt;

&lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/1261824759414090821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/1261824759414090821' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/1261824759414090821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/1261824759414090821'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/03/beware-of-splistitemsadd.html' title='Beware of SPList.Items.Add()'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-8592104908950574460</id><published>2009-03-11T23:47:00.001-05:00</published><updated>2009-03-11T23:47:31.560-05: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="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>ASP.NET 101 Reminder 2: ListItem[] is an array of Reference Types</title><content type='html'>&lt;p&gt;..which means that if you fill one ListControl with the ListItem[] array, and then fill another ListControl with the same array, &lt;strong&gt;BOTH&lt;/strong&gt; DropDownLists will be updated if you modify any ListItem (such as selecting it: ListItem.Selected = true;)&lt;/p&gt;  &lt;p&gt;If you think of a ListControl as its HTML equivalent then this may be a bit confusing and bug-prone (and indeed, once rendered as HTML the controls are no longer in sync, it only happens server-side), but from an OO perspective it does make perfect sense.&lt;/p&gt;  &lt;p&gt;It just makes me wish for easier and generic deep cloning of collections of objects…. Sigh.&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/8592104908950574460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/8592104908950574460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/8592104908950574460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/8592104908950574460'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/03/aspnet-101-reminder-2-listitem-is-array.html' title='ASP.NET 101 Reminder 2: ListItem[] is an array of Reference Types'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-6681959664138860403</id><published>2009-03-11T18:14:00.001-05:00</published><updated>2009-03-11T18:23:52.473-05: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="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="silliness"/><title type='text'>ASP.NET 101 Reminder: ListControl.Text == ListControl.SelectedValue…</title><content type='html'>&lt;p&gt;…and NOT ListControl.SelectedItem.Text&lt;/p&gt;  &lt;p&gt;ListControl implements IEditableTextControl and thus ITextControl, which mandates the Text property.&amp;#160; For whatever reason (I’m sure it was a good one) the ASP.NET architects chose to make the Text property implementation get and set the ListControl.SelectedValue rather than ListControl.SelectedItem.Text.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Coincidentally, there is no ListControl.FindByText method: the following extension methods may come in handy:&lt;/p&gt;  &lt;pre class=&quot;code&quot; style=&quot;height: 600px; margin-left:-20px; width: 485px;&quot;&gt;
/// &amp;lt;summary&amp;gt;
/// Performs a case insensitive comparison finding a ListItem by its text value, and selecting that item
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&quot;listControl&quot;&gt;The list control&amp;lt;/param&amp;gt;
/// &amp;lt;param name=&quot;text&quot;&gt;The text to match&amp;lt;/param&amp;gt;
/// &amp;lt;returns&gt;The first matched, selected &amp;lt;see cref=&quot;SPListItem&quot;/&amp;gt; or null if not found.&amp;lt;/returns&amp;gt;
public static ListItem SelectFirstByText(this ListControl listControl, string text)
{
  // first clear any previous selection 
  listControl.SelectedIndex = -1;
		
  foreach (ListItem item in listControl.Items)
  {
    if (string.Equals(item.Text, text, System.StringComparison.OrdinalIgnoreCase))
    {
      item.Selected = true;
      return item;
    }
  }
  //if not found...
  return null;
}

/// &amp;lt;summary&amp;gt;
/// Performs a case insensitive comparison finding ListItems by their text value, and selecting those items
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&quot;listControl&quot;&gt;The list control.&amp;lt;/param&amp;gt;
/// &amp;lt;param name=&quot;text&quot;&gt;The text to match.&amp;lt;/param&amp;gt;
/// &amp;lt;returns&gt;An integer array of matched indices.&amp;lt;/returns&amp;gt;
public static int[] SelectByText(this ListControl listControl, string text)
{
  List&lt;int&gt; matches = new List&lt;int&gt;();
  // first clear any previous selection 
  listControl.SelectedIndex = -1;
  int i = 0;
  foreach (ListItem item in listControl.Items)
  {
    if (string.Equals(item.Text, text, System.StringComparison.OrdinalIgnoreCase))
    {
      item.Selected = true;
      matches.Add(i);
    }
    i++;
  }
  return matches.ToArray();
}
&lt;/pre&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/6681959664138860403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/6681959664138860403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/6681959664138860403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/6681959664138860403'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/03/aspnet-101-reminder-listcontroltext.html' title='ASP.NET 101 Reminder: ListControl.Text == ListControl.SelectedValue…'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-5539739022115622407</id><published>2009-03-10T20:52:00.000-05:00</published><updated>2009-03-10T20:52:00.895-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="random"/><category scheme="http://www.blogger.com/atom/ns#" term="visual studio"/><title type='text'>Visual Studio: A handful of useful Find and Replace Expressions</title><content type='html'>&lt;ul&gt;   &lt;li&gt;Find empty get; set; property declarations:      &lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;Courier&quot;&gt;\n:b*\{:b*\n:b*get;:b*\n:b*set;:b*\n:b*\} &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;Replace empty get; set; declarations with single line equivalent:      &lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;{ get; set; } &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;Find candidates for single line summary comments:      &lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;/// \&amp;lt;summary\&amp;gt;\n:b+///:b*{[^\n]*}:b*\n:b+/// \&amp;lt;/summary\&amp;gt;&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;Replace candidates with single line equivalent:      &lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;/// \&amp;lt;summary\&amp;gt;\1\&amp;lt;/summary\&amp;gt;&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;Find Class Diagram generated get:      &lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;get\n:b+\{\n:b+throw new System.NotImplementedException\(\);\n:b+\}&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;Find Class Diagram generated empty set:      &lt;br /&gt;&lt;font size=&quot;2&quot; face=&quot;Courier New&quot;&gt;set\n:b+\{\n:b+\}&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/5539739022115622407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/5539739022115622407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/5539739022115622407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/5539739022115622407'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/03/visual-studio-handful-of-useful-find.html' title='Visual Studio: A handful of useful Find and Replace Expressions'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-729712165368441107</id><published>2009-03-06T13:33:00.001-05:00</published><updated>2009-03-06T13:41:02.218-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="experiment"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="me-me-me"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>SharePoint 14 Wishlist</title><content type='html'>&lt;p&gt;While &lt;a title=&quot;Mary-Jo Foley: Ballmer: Office 14 not this year&quot; href=&quot;http://blogs.zdnet.com/microsoft/?p=2116&quot; target=&quot;_blank&quot;&gt;14 may not be coming down the pike until next year&lt;/a&gt;, the Alpha bits are in controlled distribution, and while I haven’t actually seen them yet, I have hopes for some major changes.&amp;#160; &lt;/p&gt;  &lt;p&gt;Rather than posting my wishlist here, I thought I’d create one on Google Moderator…&lt;/p&gt;  &lt;p&gt;See &lt;a title=&quot;http://moderator.appspot.com/#16/e=295af&quot; href=&quot;http://moderator.appspot.com/#16/e=295af&quot;&gt;http://moderator.appspot.com/#16/e=295af&lt;/a&gt; – go nuts!&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/729712165368441107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/729712165368441107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/729712165368441107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/729712165368441107'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/03/sharepoint-14-wishlist.html' title='SharePoint 14 Wishlist'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-6254880820570125661</id><published>2009-02-10T13:31:00.001-05:00</published><updated>2011-10-01T13:16:19.643-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>MOSS: The dreaded schema.xml</title><content type='html'>My colleague &lt;a href=&quot;http://weblogs.asp.net/tvanfleet/&quot; target=&quot;_blank&quot; title=&quot;Tad Van Fleet&#39;s Share Intelligence&quot;&gt;Tad&lt;/a&gt; sent me a link to Andrew Connell’s post: &lt;a href=&quot;http://andrewconnell.com/blog/archive/2009/02/08/A-Quicker-Way-to-Create-Custom-SharePoint-List-Templates.aspx&quot; target=&quot;_blank&quot;&gt;A Quicker Way to Create Custom SharePoint List Templates&lt;/a&gt; with the comment - ‘I guess “quicker” is relative.’&amp;nbsp; Tad’s right – this seems to be going too far for a simple schema.xml file.&lt;br /&gt;
Much of Andrew’s post is valid – there’s not much doing getting around the Content Types and the List Template (if you need them), and using the OOTB list interface plus &lt;a href=&quot;http://keutmann.blogspot.com/&quot; target=&quot;_blank&quot; title=&quot;Carsten Keutmann&#39;s blog&quot;&gt;Keutmann&lt;/a&gt;’s excellent &lt;a href=&quot;http://www.codeplex.com/spm&quot; target=&quot;_blank&quot; title=&quot;SharePoint Manager 2007 on CodePlex&quot;&gt;SharePoint Manager&lt;/a&gt; tool&amp;nbsp; to build queries is a simple workaround, but I’m balking on his approach for creating the the List’s schema.&amp;nbsp; If you take Andrew’s approach, you’re gonna end up with a MINIMUM of 1600 lines of xml in your schema: my approach is far simpler; below is a fully functioning schema that’s only 30+ lines – see if you can spot the magic bullet…:&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;version&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;1.0&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;encoding&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;utf-8&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;xmlns:ows&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Microsoft SharePoint&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Id&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;{AB426CDE-98F2-432A-B296-880C7931DEF3}&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Title&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Setting&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Url&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Lists/Setting&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;BaseType&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;FolderCreation&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;FALSE&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;DisableAttachments&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;TRUE&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;VersioningEnabled&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;FALSE&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Direction&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;$Resources:Direction;&lt;/span&gt;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;http://schemas.microsoft.com/sharepoint/&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;MetaData&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Fields&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Field&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Text&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Title&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;DisplayName&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Name&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Required&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;TRUE&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Field&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Text&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Value&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;DisplayName&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Value&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Required&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;TRUE&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Fields&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Views&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;View&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;BaseViewID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;HTML&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;WebPartZoneID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Main&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;DisplayName&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;All Items&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;DefaultView&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;TRUE&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;MobileView&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;True&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;MobileDefaultView&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;False&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;SetupPath&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;pages\viewpage.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;ImageUrl&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/_layouts/images/issues.png&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Url&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;AllItems.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;ViewStyle&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;17&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;RowLimit&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Paged&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;TRUE&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;100&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;RowLimit&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Toolbar&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Standard&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;ViewFields&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;FieldRef&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Edit&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;FieldRef&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Title&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;FieldRef&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Value&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;ViewFields&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Query&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;OrderBy&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;FieldRef&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Title&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;OrderBy&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Query&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;View&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Views&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Forms&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;DisplayForm&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Url&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;DispForm.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;SetupPath&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;pages\form.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;WebPartZoneID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Main&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;EditForm&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Url&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;EditForm.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;SetupPath&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;pages\form.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;WebPartZoneID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Main&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Form&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;NewForm&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Url&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;NewForm.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;SetupPath&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;pages\form.aspx&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;WebPartZoneID&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt;Main&lt;/span&gt;&quot;&lt;span style=&quot;color: blue;&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;Forms&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;DefaultDescription&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;Settings used in the application.&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;DefaultDescription&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;MetaData&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;color: blue; line-height: 115%;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #a31515; line-height: 115%;&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;color: blue; line-height: 115%;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
Yep, it’s &lt;a href=&quot;http://mo.notono.us/2007/10/moss-viewstyle-tag.html&quot; title=&quot;MOSS: The ViewStyle Tag&quot;&gt;the ViewStyle tag&lt;/a&gt; I wrote about back in 2007.&amp;nbsp; It eliminates that 90% of the schema file that Andrew suggests you ignore, leaving a fairly terse xml that can actually be digested and debugged (sort of).&lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/6254880820570125661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/6254880820570125661' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/6254880820570125661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/6254880820570125661'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/02/moss-dreaded-schemaxml.html' title='MOSS: The dreaded schema.xml'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-1588698561142513171</id><published>2009-01-13T21:25:00.001-05:00</published><updated>2009-01-13T21:25:39.285-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="experiment"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="wiki"/><title type='text'>MOSS: Add Incoming Links to a Wiki Page with jQuery</title><content type='html'>&lt;p&gt;Sharepoint’s wiki implementation is rudimentary, but still useful.&amp;#160; One of the corners cut in the implementation is that incoming links are on a separate page – you have to click the Incoming Links link (and wait for the screen to refresh) to see them.&amp;#160; It’d be much more user-friendly to show these links on the same page as the content.&lt;/p&gt;  &lt;p&gt;Turns out with jQuery this is a fairly trivial exercise,&amp;#160; at least for a single Wiki page*:&amp;#160; Simply add a Content Editor Web part to the page and copy &lt;a title=&quot;tinypaste copy of the code&quot; target=&quot;_blank&quot; href=&quot;http://tinypaste.com/7bb12&quot;&gt;the following code&lt;/a&gt; into the Source Editor.&lt;/p&gt;  &lt;div style=&quot;border-bottom: #d0d0d0 1px solid; border-left: #d0d0d0 1px solid; background-color: #f0f0f0; font-family: monospace; color: #006; border-top: #d0d0d0 1px solid; border-right: #d0d0d0 1px solid&quot; class=&quot;javascript&quot;&gt;&amp;lt;script src=&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;   &lt;br /&gt;&lt;span style=&quot;color: #339933&quot;&gt;&amp;lt;&lt;/span&gt;script type&lt;span style=&quot;color: #339933&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #3366cc&quot;&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933&quot;&gt;&amp;gt;&lt;/span&gt;    &lt;br /&gt;$&lt;span style=&quot;color: #009900&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #003366; font-weight: bold&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #009900&quot;&gt;{&lt;/span&gt;    &lt;br /&gt;&amp;#160; &lt;span style=&quot;font-style: italic; color: #006600&quot;&gt;//get the url for the incoming links page&lt;/span&gt;    &lt;br /&gt;&amp;#160; u &lt;span style=&quot;color: #339933&quot;&gt;=&lt;/span&gt; $&lt;span style=&quot;color: #009900&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #3366cc&quot;&gt;&amp;quot;a[id$=WikiIncomingLinks_LinkText]&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #cc0000&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;]&lt;/span&gt;.&lt;span style=&quot;color: #660066&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #339933&quot;&gt;;&lt;/span&gt;     &lt;br /&gt;    &lt;br /&gt;&amp;#160; &lt;span style=&quot;font-style: italic; color: #006600&quot;&gt;//create a target container and load it with the incoming links&lt;/span&gt;    &lt;br /&gt;&amp;#160; &lt;span style=&quot;font-style: italic; color: #006600&quot;&gt;//filtered to show the links list only&lt;/span&gt;    &lt;br /&gt;&amp;#160; l &lt;span style=&quot;color: #339933&quot;&gt;=&lt;/span&gt; $&lt;span style=&quot;color: #009900&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #3366cc&quot;&gt;&amp;quot;&amp;lt;div id=&#39;incomingLinks&#39; style=&#39;border-top: solid 1px&amp;#160; silver&#39;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;)&lt;/span&gt;.&lt;span style=&quot;color: #660066&quot;&gt;load&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;(&lt;/span&gt;u &lt;span style=&quot;color: #339933&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #3366cc&quot;&gt;&amp;quot; .ms-formareaframe&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933&quot;&gt;;&lt;/span&gt;    &lt;br /&gt;    &lt;br /&gt;&amp;#160; &lt;span style=&quot;font-style: italic; color: #006600&quot;&gt;//append the new container to the wiki content&lt;/span&gt;    &lt;br /&gt;&amp;#160; $&lt;span style=&quot;color: #009900&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #3366cc&quot;&gt;&amp;quot;.ms-wikicontent&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;)&lt;/span&gt;.&lt;span style=&quot;color: #660066&quot;&gt;append&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;(&lt;/span&gt;l&lt;span style=&quot;color: #009900&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933&quot;&gt;;&lt;/span&gt;    &lt;br /&gt;&lt;span style=&quot;color: #009900&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #009900&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933&quot;&gt;;&lt;/span&gt;    &lt;br /&gt;    &lt;br /&gt;&lt;span style=&quot;color: #339933&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;span style=&quot;color: #339933&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;  &lt;p&gt;It may be noted that the above code could even be combined into one single chain – I prefer the above for readability and debugging purposes.&amp;#160; Also not sure if I need to dispose of the local variables – this is a POC more than anything else.&lt;/p&gt;  &lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge07sPyHtbv5nzdXArFWQoFCinLrow56ebJStOFWLqDZ-lBJucGYkOjS8o8nxBohA8JxgelY8SeZii5Ckso_0N4FYeAIGJ-FunutEOlJLsfPmVqkzbRurwiStU6_F-z40hLa6eXw/s1600-h/CropperCapture%5B24%5D%5B6%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;Adding script through a CEW part&quot; border=&quot;0&quot; alt=&quot;Adding script through a CEW part&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0m504kht2vMC85Rkr_ItgY2qqgN2rsUENcRyc9GvbouBskW8i6wKxyYC3NcGMJwdd8lzHHQ1NOLLNsbmtP9jxuASlj5yMb7hJnVQ5Ffl9yaHgRx32I5Rf8BGZwA-yjxg2ok25DA/?imgmax=800&quot; width=&quot;412&quot; height=&quot;204&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The incoming links are now on the page, right below the content:&lt;/p&gt;  &lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfhAwxnT6khnAXMEpjqnXNg2SLaUQARkhroQu1aTIolHZQNJmlV5C43C5bIG2VRHviuI85KxVzubGLySNl1vUl8WIbeF7cMIgKqX2GTcHA_fH104GVkL8basoj5Y8lJ5dJBSVM-w/s1600-h/CropperCapture%5B24%5D%5B11%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;Incoming Links directly on the Wiki Page&quot; border=&quot;0&quot; alt=&quot;Incoming Links directly on the Wiki Page&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhASsi9JseCsOV0kGSDuRSQAMlnryIlrofrt8tYnnasbwvhyphenhyphenMoYlemTf36_T21pna9gGmszqvWGb3Td6T47K7yEPFJsVJMCbLW0h7Vyo_salJT9JN23NC5vKkg0HMZQJRgmfrgVBw/?imgmax=800&quot; width=&quot;239&quot; height=&quot;170&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;A more thorough implementation might position the links in a box in the upper left corner, and simultaneously removing the “Incoming Links” link.&lt;/p&gt;  &lt;p&gt;*I haven’t quite thought out how to inject this throughout a wiki.&amp;#160; Any suggestions?&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/1588698561142513171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/1588698561142513171' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/1588698561142513171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/1588698561142513171'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2009/01/moss-add-incoming-links-to-wiki-page.html' title='MOSS: Add Incoming Links to a Wiki Page with jQuery'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0m504kht2vMC85Rkr_ItgY2qqgN2rsUENcRyc9GvbouBskW8i6wKxyYC3NcGMJwdd8lzHHQ1NOLLNsbmtP9jxuASlj5yMb7hJnVQ5Ffl9yaHgRx32I5Rf8BGZwA-yjxg2ok25DA/s72-c?imgmax=800" height="72" width="72"/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-560957266183794878</id><published>2008-12-15T18:41:00.001-05:00</published><updated>2008-12-15T18:41:17.510-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type='text'>Re-Professing My Love of WSPBuilder</title><content type='html'>&lt;p&gt;Say what you will about SharePoint as an application development platform; it adds a significant crapwork overhead to your everyday asp.net development.&amp;#160; Especially when it comes to organizing folder structures, creating xml files that point to other xml files, the lovely ddf syntax, etc.&lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;WSPBuilder on CodePlex&quot; target=&quot;_blank&quot; href=&quot;http://codeplex.com/wspbuilder&quot;&gt;WSPBuilder&lt;/a&gt; on the other hand…&lt;/p&gt;  &lt;p&gt;To create a new artifact:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2wsy-92l_5uidv7UnPC-Q1mcEttpyXJqQi71pXKWGiXZGaDlbxsX0WxASYuAgKaTKgJVzY7pMbb9so_Ue5tzxoVslICXjmgDhrjX6HpZXK7tiaQOGSAOyIvre1sta9aMWVlIeWg/s1600-h/CropperCapture%5B15%5D%5B5%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;CropperCapture[15]&quot; border=&quot;0&quot; alt=&quot;CropperCapture[15]&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOlBhYohjKv3vDhlOU9LxuWGvEygd8BlO0eaxjzfw2EKtEix0CmlWZw8U2CA6s6bv4877tKWr7u1zqvFXT09i0abyMGR9k88l9QoWox2SsvZ1uSKFwjK6RTl8Ovks252BN2mQbmQ/?imgmax=800&quot; width=&quot;416&quot; height=&quot;119&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To deploy your solution (even includes an MSI installer in the Deployment Folder):&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBIo_zTb9bLVULYEC4XrJGGetFx0h-0J0G5J2OGIUMiP4_sp3wCsmgb9HIKHcH2Z0q1z-N0MBAqrTgUc5E8ihHIkwHP_tgDrTbPaVTQFGO2iavri5dSJNAguf-E-6eZ2PFug0vPg/s1600-h/CropperCapture%5B18%5D%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;CropperCapture[18]&quot; border=&quot;0&quot; alt=&quot;CropperCapture[18]&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-26IEkzwImFIN01K7U_k1jIijm_4Fct9UrCX0ZYtX5OWN3NiXHXkN0eEyL9vqZ_cw2WFInOckonh8JbndNgN31kkMWbO2bI_hF9UxkjZjWgsczvZY9mNYAo_OQ4MP8PzkrGd8wg/?imgmax=800&quot; width=&quot;415&quot; height=&quot;242&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/560957266183794878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/560957266183794878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/560957266183794878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/560957266183794878'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/12/re-professing-my-love-of-wspbuilder.html' title='Re-Professing My Love of WSPBuilder'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOlBhYohjKv3vDhlOU9LxuWGvEygd8BlO0eaxjzfw2EKtEix0CmlWZw8U2CA6s6bv4877tKWr7u1zqvFXT09i0abyMGR9k88l9QoWox2SsvZ1uSKFwjK6RTl8Ovks252BN2mQbmQ/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-4276929976825060122</id><published>2008-12-12T17:10:00.001-05:00</published><updated>2008-12-12T17:10:18.292-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="silliness"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualization"/><title type='text'>Vista SP2 Includes Hyper-V…</title><content type='html'>&lt;p&gt;...but you can’t actually access it:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;b&gt;“Hyper-V&lt;/b&gt; * &lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;“Windows Vista SP2 includes Hyper-V™ technology, enabling full virtualization of server workloads &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;“*To clarify, Hyper-V is not included in Windows Vista SP2, it is part of the Windows Server 2008 service pack. This means that when you install SP2 for Windows Server 2008, or if you install a slipstreamed version of Windows Server 2008 with SP2, the RTM version of the Hyper-V role will be included. Hyper-V was released after Windows Server 2008, which means that the role you currently install is a pre-release role and needs to be updated to bring it up to RTM. This update will be applied (only if necessary) automatically when you install SP2.”&lt;/p&gt;    &lt;p&gt;&lt;a href=&quot;http://blogs.technet.com/springboard/archive/2008/12/02/windows-vista-sp2-what-s-inside-what-s-important.aspx&quot;&gt;http://blogs.technet.com/springboard/archive/2008/12/02/windows-vista-sp2-what-s-inside-what-s-important.aspx&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The post goes on to state that*:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“There Is Now Free Lunch*, (*to clarify: &lt;a title=&quot;TANSTAAFL on Wikipedia&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Tanstaafl&quot;&gt;There Ain’t No Such Thing As A Free Lunch&lt;/a&gt;)”.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;*To clarify, the post does not actually state that.&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/4276929976825060122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/4276929976825060122' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4276929976825060122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4276929976825060122'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/12/vista-sp2-includes-hyper-v.html' title='Vista SP2 Includes Hyper-V…'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-4695906754631915093</id><published>2008-12-01T16:04:00.001-05:00</published><updated>2009-01-10T13:55:12.270-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualization"/><title type='text'>Installing Security Update for SQL Server Service Pack 2 (KB954606) takes a LOOOONG time</title><content type='html'>&lt;p&gt;While I’m &lt;a title=&quot;mo.notono.us: The Bane of My VPC Existence&quot; href=&quot;http://mo.notono.us/2008/12/bane-of-my-vpc-existence.html&quot;&gt;ranting&lt;/a&gt;, I might as well point out that installing &lt;a title=&quot;MSDN: Security Update for SQL Server 2005 Service Pack 2 (KB954606)&quot; href=&quot;http://www.microsoft.com/downloads/details.aspx?familyid=4603C722-2468-4ADB-B945-2ED0458B8F47&amp;amp;displaylang=en&quot;&gt;the Security Update for SQL Server 2005 Service Pack 2 (KB954606)&lt;/a&gt; takes forever and a day, with no info in the “Overall Progress” bar.&amp;#160; That said – don’t try to cancel the update, &lt;strong&gt;the Cancel operation takes just as long&lt;/strong&gt;.&amp;#160; So the longer you waited before you gave up on the update, the longer you’ll have to wait for the cancellation to finish.&lt;/p&gt;  &lt;p&gt;Yay.&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/4695906754631915093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/4695906754631915093' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4695906754631915093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4695906754631915093'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/12/installing-security-update-for-sql.html' title='Installing Security Update for SQL Server Service Pack 2 (KB954606) takes a LOOOONG time'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-1543092618473702013</id><published>2008-12-01T14:49:00.001-05:00</published><updated>2009-01-10T13:55:12.271-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="errors"/><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="rant"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualization"/><title type='text'>&amp;lt;rant&amp;gt; The Bane of my VPC Existence</title><content type='html'>&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLIqTH8rRe5x2uw_GSL6rHUuoThdwQXrxYl4GpvvR59NGJR9GqCAGfPtjKMnIbMG-YDM6cq059rA4cYE6wnYy0neRDJkow-EAC_MBMpWsbrSJ5e8lL_8UCAF9GrXgA7dr0NcxEJA/s1600-h/image%5B5%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihIT7_KyueUGlAjS6VyDTbO21tPjVThfC77L4oe46a9pyZMQHGRzF_AEXAc56ohpbwDAEikwamhyA0inPI0dpAcnMqUFGVPq1PHI9a9eNboy8wFk28JJzq0qxQQObWOeYQAgnKdg/?imgmax=800&quot; width=&quot;393&quot; height=&quot;197&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Aaaargh.&amp;#160; Other than simply plugging the plug on my VPC (Action – Close – Turn Off), there just doesn’t seem to be a reliable way to quickly suspend my VPC work:&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDtsKQaXHJnYLnyaidBR-08rDg63hbEYXqU8CIe2aq8j-izj3ApLf8cblCoqckrEOpqnVSNNsKELPVUlrIBcKjQ_TYY5zdynn9jgQooaFnRcSnJFoG22RznDDT6as9Pj3XmTBjIA/s1600-h/CropperCapture%5B9%5D%5B4%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;CropperCapture[9]&quot; border=&quot;0&quot; alt=&quot;CropperCapture[9]&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEialPxLgLwQH7pQUiJYVBRexrK6zn8KZn3CAT1R0muPzh82INGzXEgkigV7qgUISsMgHwXJHqFN0QGgAvUTBQon2aklbqkN-3Yx0avB4JXfX9-iw_zTE0zortFOtpzfRSicC8cBAQ/?imgmax=800&quot; width=&quot;398&quot; height=&quot;187&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Since I work on an external drive with a standalone power supply I don’t dare simply suspending my laptop.&lt;/p&gt;  &lt;p&gt;Finding that &lt;a title=&quot;Virtual PC 2.0: Not Just a Minor Upgrade&quot; target=&quot;_blank&quot; href=&quot;http://db.tidbits.com/article/4923&quot;&gt;this is an issue that basically has been around since 1998&lt;/a&gt; does not make me any more happy:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Still Some Bumps&lt;/strong&gt; -- We mentioned in &lt;a href=&quot;http://www.tidbits.com/tb-issues/TidBITS-397.html&quot;&gt;TidBITS-397&lt;/a&gt; that changing the Mac&#39;s state, such as swapping a CD-ROM drive for a floppy drive in a PowerBook, could wreak havoc with Virtual PC&#39;s &amp;quot;saved state&amp;quot; feature. This is somewhat understandable, since when Virtual PC saves the state of your emulated PC clone for quick launching later, it has to assume that the physical machine will remain the same.&lt;/p&gt;    &lt;p&gt;However, &lt;strong&gt;Virtual PC could handle these situations more gracefully. The current procedure - informing the user that the saved PC state could not be restored, and then restarting the PC - nearly guarantees the same kind of directory damage and hurt feelings that suddenly restarting a real PC would cause. The software should tell the user what&#39;s wrong and either allow an opportunity to set things right before proceeding or cancel the launch and let the user try again later with the proper hardware present, resorting to a restart only as a final option.&lt;/strong&gt;&lt;/p&gt;    &lt;p align=&quot;right&quot;&gt;&lt;a title=&quot;TidBITS, Mac News for the rest of us: Virtual PC 2.0: Not Just a Minor Upgrade&quot; target=&quot;_blank&quot; href=&quot;http://db.tidbits.com/article/4923&quot;&gt;TidBITS, Mac News for the rest of us: Virtual PC 2.0: Not Just a Minor Upgrade&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Oh – and in case you’re thinking this talks about a different product, no – it’s the same…:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Virtual PC was originally developed by Connectix for the Macintosh and was released in June 1997. In June 2001 the first version of Virtual PC for Windows, version 4.0, was released. Connectix sold versions of Virtual PC bundled with a variety of operating systems, including many versions of Windows, &lt;a href=&quot;http://en.wikipedia.org/wiki/OS/2&quot;&gt;OS/2&lt;/a&gt;, and &lt;a href=&quot;http://en.wikipedia.org/wiki/Red_Hat_Linux&quot;&gt;Red Hat Linux&lt;/a&gt;. As it became clear that virtualization was important to the enterprise, &lt;strong&gt;Microsoft became interested in the sector and acquired Virtual PC and an (at the time) unreleased product called &amp;quot;&lt;/strong&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Microsoft_Virtual_Server&quot;&gt;&lt;strong&gt;Virtual Server&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&amp;quot; from Connectix in February 2003.&lt;/strong&gt;&amp;#160;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p align=&quot;right&quot;&gt;– &lt;a title=&quot;Microsoft Virtual PC - Wikipedia&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Microsoft_Virtual_PC#Version_history&quot;&gt;Wikipedia, Microsoft Virtual PC, Version History&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I’m oh so happy to see that Connectix/MS did NOTHING to address this in the 8-9 years between v2 and v2007.&lt;/p&gt;  &lt;p&gt;&amp;lt;/rant&amp;gt;&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/1543092618473702013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/1543092618473702013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/1543092618473702013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/1543092618473702013'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/12/bane-of-my-vpc-existence.html' title='&amp;lt;rant&amp;gt; The Bane of my VPC Existence'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihIT7_KyueUGlAjS6VyDTbO21tPjVThfC77L4oe46a9pyZMQHGRzF_AEXAc56ohpbwDAEikwamhyA0inPI0dpAcnMqUFGVPq1PHI9a9eNboy8wFk28JJzq0qxQQObWOeYQAgnKdg/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-5626928668226450479</id><published>2008-11-25T11:03:00.001-05:00</published><updated>2009-01-10T13:55:49.334-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="advertising"/><category scheme="http://www.blogger.com/atom/ns#" term="me-me-me"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="rave"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type='text'>TypeMock offers Unit Testing Framework for SharePoint</title><content type='html'>&lt;p&gt;First a disclosure:&amp;#160; This is a blatantly self-serving post: I want to be one of 50 recipients of a free copy of “Isolator for SharePoint”.&lt;/p&gt;  &lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://blog.typemock.com/2008/11/newisolatorforsharepointtoolforunittest.html&quot;&gt;Mandatory statement&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Typemock are offering their new product for &lt;a href=&quot;http://www.typemock.com/sharepointpage.php?utm_source=sp_bb&amp;amp;utm_medium=blog_4sp&amp;amp;utm_campaign=sp_bb&quot;&gt;unit testing SharePoint&lt;/a&gt; called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to &lt;a href=&quot;http://blog.typemock.com/2008/11/newisolatorforsharepointtoolforunittest.html?utm_source=typeblog&amp;amp;utm_medium=sp_bb&amp;amp;utm_campaign=typeblog&quot;&gt;unit test SharePoint&lt;/a&gt; without a SharePoint server. To learn more &lt;a href=&quot;http://www.typemock.com/sharepointpage.php?utm_source=sp_bb&amp;amp;utm_medium=blog_4sp&amp;amp;utm_campaign=sp_bb&quot;&gt;click here&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;The first 50 bloggers &lt;/strong&gt;who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info &lt;a href=&quot;http://blog.typemock.com/2008/11/newisolatorforsharepointtoolforunittest.html&quot;&gt;click here&lt;/a&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font color=&quot;#666666&quot;&gt;But that said, I am intrigued by two things:&amp;#160; Roy Osherove is now doing SharePoint development?&amp;#160; That can’t hurt the community.&amp;#160; Second, I heard rumors this will work on a non-SharePoint server.&amp;#160; Could my VPC days be coming to an end?&amp;#160; (Couldn’t come fast enough…)&lt;/font&gt;&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/5626928668226450479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/5626928668226450479' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/5626928668226450479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/5626928668226450479'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/11/typemock-offers-unit-testing-framework.html' title='TypeMock offers Unit Testing Framework for SharePoint'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-7535878773546881884</id><published>2008-11-07T11:18:00.001-05:00</published><updated>2008-11-07T11:18:18.213-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type='text'>Papercut</title><content type='html'>&lt;p&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://invalidlogic.com/papercut/&quot;&gt;This&lt;/a&gt; looks like a really handy little utility for&amp;#160; testing stuff like workflow: the utility allows your program to connect to the SMTP server and “send”, but doesn’t actually send the message anywhere – it just gets added to &lt;a target=&quot;_blank&quot; href=&quot;http://invalidlogic.com/papercut/&quot;&gt;the papercut app&lt;/a&gt;, which lets you see the raw, body and html view of the email.&lt;/p&gt;  &lt;p&gt;&lt;img src=&quot;http://invalidlogic.com/papercut/screenshot1.jpg&quot; width=&quot;458&quot; height=&quot;274&quot; /&gt;&lt;/p&gt;  &lt;p&gt;&lt;img border=&quot;0&quot; src=&quot;http://invalidlogic.com/papercut/screenshot2.jpg&quot; width=&quot;263&quot; height=&quot;75&quot; /&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;via &lt;a title=&quot;Simpable - Learning something new everyday: Papercut - Easy Email Testing&quot; target=&quot;_blank&quot; href=&quot;http://simpable.com/code/papercut/&quot;&gt;Scott Watermasysk&lt;/a&gt;&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/7535878773546881884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/7535878773546881884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/7535878773546881884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/7535878773546881884'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/11/papercut.html' title='Papercut'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-5464523766357989301</id><published>2008-10-24T10:50:00.001-05:00</published><updated>2008-10-24T10:50:39.177-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>MOSS: Are Site Definitions Evil?</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://weblogs.asp.net/tvanfleet&quot;&gt;Tad&lt;/a&gt; pointed me to a post by “SharePoint Joel” aka Joel Oleson in which he rants about the evils of highly customized Site Definitions:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href=&quot;http://www.sharepointjoel.com/Lists/Posts/Post.aspx?ID=117&quot;&gt;Just SAY NO to Creating Custom Site Definitions&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Joel even goes as far as saying that Site Templates (stp files) are a better option than customized Site Definitions. His point is basically, if you need a custom site, use the basic OOTB Site Template and then use Feature Stapling to achieve the necessary customization.&lt;/p&gt;  &lt;p&gt;Andrew Connell says pretty much the same thing in his post from February:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href=&quot;http://andrewconnell.com/blog/archive/2008/02/15/You-dont-need-to-create-site-definitions.aspx&quot;&gt;You don&#39;t need to create site definitions&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;He is less generally, broad strokes dismissive of Site Definitions – his point is:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“We just need [custom Site Definitions] at times. In those times I go with the minimalist approach... [...] I take a copy of the blank site and strip it way down... no TeamCollab Feature, no WSS branding image... nothing... a truly blank site. I then give it a new name and ID. ...then create associated stapling Features that are used to attach [custom functionality] to the site def.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Tad and I are both generally in agreement with Andrew’s approach, but a bit wary of the extent to which Joel wants to take things. There is a benefit to having an identifier for our custom site template/definition, and a single instantiation point for an end user – but the bulk of customizations should be done through Features/in code.&lt;/p&gt;  &lt;p&gt;[As an aside, I am in favor of doing the very same thing for Lists – use a bare bones schema file (without the 1200 lines of View CAML), then use API code to customize the list as needed.]&lt;/p&gt;  &lt;p&gt;Thoughts?&lt;/p&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/5464523766357989301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/5464523766357989301' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/5464523766357989301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/5464523766357989301'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/10/moss-are-site-definitions-evil.html' title='MOSS: Are Site Definitions Evil?'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-8849054380836134025</id><published>2008-09-24T11:15:00.001-05:00</published><updated>2008-09-24T11:15:57.945-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="news"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>MOSS: Goodbye 2000 limit, Hello 3000?</title><content type='html'>&lt;div style=&quot;margin: 1em; display: block; float: left&quot; class=&quot;zemanta-img zemanta-action-click&quot;&gt;&lt;a href=&quot;http://www.crunchbase.com/company/microsoft&quot;&gt;&lt;img style=&quot;border-bottom-style: none; border-right-style: none; display: block; border-top-style: none; border-left-style: none&quot; alt=&quot;Image representing Microsoft as depicted in Cr...&quot; src=&quot;http://www.crunchbase.com/assets/images/resized/0001/0926/10926v1-max-250x250.png&quot; /&gt;&lt;/a&gt;     &lt;p class=&quot;zemanta-img-attribution&quot;&gt;Image via &lt;a href=&quot;http://www.crunchbase.com/&quot;&gt;CrunchBase&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;The rule of thumb for SharePoint lists has always been “&lt;a title=&quot;993 Google Hits on the query &amp;#39;Sharepoint &amp;quot;2000 items&amp;quot;&amp;#39; - soon to be 994.&quot; target=&quot;_blank&quot; href=&quot;http://www.google.com/search?hl=en&amp;amp;rlz=1C1GGLS_enUS291&amp;amp;q=sharepoint+&amp;quot;2000+items&amp;quot;&amp;amp;btnG=Search&quot;&gt;no more than 2000 items in a given container&lt;/a&gt;”.&lt;/p&gt;  &lt;p&gt;Now in the recently released White Paper &lt;a title=&quot;Download the Word 2003 Document&quot; target=&quot;_blank&quot; href=&quot;http://download.microsoft.com/download/0/E/B/0EBA7263-A555-4279-B9DD-1720F0139A2E/SharePointOptimizationTWP.doc&quot;&gt;“SharePoint Performance Optimization - How Microsoft IT Increases Availability and Decreases Rendering Time of SharePoint Sites”&lt;/a&gt;, the following is stated in the Best Practices section:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“&lt;strong&gt;Manage large lists for performance&amp;#160;&amp;#160; &lt;/strong&gt;      &lt;br /&gt;Having large lists by itself is not necessarily a performance issue. When SharePoint Server renders the many items in those lists, that can cause spikes in render times and database blocking. One way to mitigate large lists is to use subfolders and create a hierarchical structure where each folder or subfolder has no more than 3,000 items.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font color=&quot;#666666&quot;&gt;The 2000 items was always a soft limit, of course, but interesting to see MS now saying 3000…&lt;/font&gt;&lt;/p&gt;  &lt;h6 style=&quot;font-size: 1em&quot; class=&quot;zemanta-related-title&quot;&gt;Related articles by Zemanta&lt;/h6&gt;  &lt;ul class=&quot;zemanta-article-ul&quot;&gt;   &lt;li class=&quot;zemanta-article-ul-li&quot;&gt;&lt;a href=&quot;http://arnoldit.com/wordpress/2008/09/23/sharepoint-improving-performance/&quot;&gt;SharePoint: Improving Performance&lt;/a&gt;&lt;/li&gt;    &lt;li class=&quot;zemanta-article-ul-li&quot;&gt;&lt;a href=&quot;http://www.infoworld.com/article/08/04/08/Microsoft-releases-some-of-promised-Office-documentation_1.html?source=rss&amp;amp;url=http://www.infoworld.com/article/08/04/08/Microsoft-releases-some-of-promised-Office-documentation_1.html&quot;&gt;Microsoft releases some of promised Office documentation&lt;/a&gt;&lt;/li&gt;    &lt;li class=&quot;zemanta-article-ul-li&quot;&gt;&lt;a href=&quot;http://news.cnet.com/8301-13505_3-10037080-16.html?part=rss&amp;amp;subj=news&quot;&gt;Microsoft&#39;s response to Google Chrome? SharePoint&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div style=&quot;margin-top: 10px; height: 15px&quot; class=&quot;zemanta-pixie&quot;&gt;&lt;a class=&quot;zemanta-pixie-a&quot; title=&quot;Zemified by Zemanta&quot; href=&quot;http://reblog.zemanta.com/zemified/a3cfbe08-cff0-40c1-aa05-0ebab33a75c7/&quot;&gt;&lt;img style=&quot;border-bottom-style: none; border-right-style: none; border-top-style: none; float: right; border-left-style: none&quot; class=&quot;zemanta-pixie-img&quot; alt=&quot;Reblog this post [with Zemanta]&quot; src=&quot;http://img.zemanta.com/reblog_b.png?x-id=a3cfbe08-cff0-40c1-aa05-0ebab33a75c7&quot; /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/8849054380836134025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/8849054380836134025' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/8849054380836134025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/8849054380836134025'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/09/moss-goodbye-2000-limit-hello-3000.html' title='MOSS: Goodbye 2000 limit, Hello 3000?'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5655646.post-4857574776604666276</id><published>2008-07-22T13:11:00.001-05:00</published><updated>2008-07-22T13:11:36.724-05: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="experiment"/><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="moss"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><category scheme="http://www.blogger.com/atom/ns#" term="visual studio"/><category scheme="http://www.blogger.com/atom/ns#" term="windows forms"/><title type='text'>C#: String.Inject() - Format strings by key tokens</title><content type='html'>&lt;p&gt;I generally prefer to use String.Format() instead of doing a bunch of string additions, but constantly find myself splitting the code onto multiple lines with an appended comment to keep track of the indices:&lt;/p&gt;  &lt;div class=&quot;CodeFormatContainer&quot;&gt;   &lt;div class=&quot;csharpcode&quot;&gt;     &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; myString = &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;.Format(&lt;span class=&quot;str&quot;&gt;&amp;quot;{0} is {1} and {2} is {3}&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

    &lt;pre&gt;  o.foo, &lt;span class=&quot;rem&quot;&gt;//0&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;  o.bar, &lt;span class=&quot;rem&quot;&gt;//1&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;  o.yadi, &lt;span class=&quot;rem&quot;&gt;//2&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;  o.yada &lt;span class=&quot;rem&quot;&gt;//3&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;);&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Wouldn&#39;t it be nice you could instead write something like this?:&lt;/p&gt;

&lt;div class=&quot;CodeFormatContainer&quot;&gt;
  &lt;div class=&quot;csharpcode&quot;&gt;
    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; myString = &lt;span class=&quot;str&quot;&gt;&amp;quot;{foo} is {bar} and {yadi} is {yada}&amp;quot;&lt;/span&gt;.Inject(o);&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Well, now you can - see the string extension method &lt;em&gt;Inject&lt;/em&gt; below; it accepts an object, IDictionary or HashTable and replaces the property name/key tokens with the instance values.&amp;#160; Since it uses string.Format internally, it also supports &lt;a title=&quot;MSDN Library: Formatting Overview&quot; href=&quot;http://msdn.microsoft.com/en-us/library/26etazsy(loband).aspx&quot; target=&quot;_blank&quot;&gt;string.Format-like custom formatting&lt;/a&gt;:&lt;/p&gt;

&lt;div style=&quot;overflow-y: visible; font-size: 8pt; overflow-x: scroll; margin-left: -35px; width: 510px; height: 650px&quot; class=&quot;CodeFormatContainer&quot;&gt;
  &lt;div class=&quot;csharpcode&quot;&gt;
    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;using&lt;/span&gt; System;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;using&lt;/span&gt; System.Text.RegularExpressions;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;using&lt;/span&gt; System.Collections;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;using&lt;/span&gt; System.Globalization;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;using&lt;/span&gt; System.ComponentModel;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;[assembly: CLSCompliant(&lt;span class=&quot;kwrd&quot;&gt;true&lt;/span&gt;)]&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;namespace&lt;/span&gt; StringInject&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;{&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;  &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; StringInjectExtension&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;  {&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// Extension method that replaces keys in a string with the values of matching object properties.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  14:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;remarks&amp;gt;Uses &amp;lt;see cref=&amp;quot;String.Format()&amp;quot;/&amp;gt; internally; custom formats should match those used for that method.&amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  15:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  16:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;formatString&amp;quot;&amp;gt;The format string, containing keys like {foo} and {foo:SomeFormat}.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  17:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;injectionObject&amp;quot;&amp;gt;The object whose properties should be injected in the string&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  18:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;returns&amp;gt;A version of the formatString string with keys replaced by (formatted) key values.&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  19:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Inject(&lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; formatString, &lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; injectionObject)&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  20:  &lt;/span&gt;    {&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  21:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; formatString.Inject(GetPropertyHash(injectionObject));&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  22:  &lt;/span&gt;    }&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  23:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  24:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  25:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// Extension method that replaces keys in a string with the values of matching dictionary entries.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  26:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;remarks&amp;gt;Uses &amp;lt;see cref=&amp;quot;String.Format()&amp;quot;/&amp;gt; internally; custom formats should match those used for that method.&amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  27:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  28:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;formatString&amp;quot;&amp;gt;The format string, containing keys like {foo} and {foo:SomeFormat}.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  29:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;dictionary&amp;quot;&amp;gt;An &amp;lt;see cref=&amp;quot;IDictionary&amp;quot;/&amp;gt; with keys and values to inject into the string&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  30:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;returns&amp;gt;A version of the formatString string with dictionary keys replaced by (formatted) key values.&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  31:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Inject(&lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; formatString, IDictionary dictionary)&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  32:  &lt;/span&gt;    {&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  33:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; formatString.Inject(&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Hashtable(dictionary));&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  34:  &lt;/span&gt;    }&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  35:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  36:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  37:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// Extension method that replaces keys in a string with the values of matching hashtable entries.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  38:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;remarks&amp;gt;Uses &amp;lt;see cref=&amp;quot;String.Format()&amp;quot;/&amp;gt; internally; custom formats should match those used for that method.&amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  39:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  40:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;formatString&amp;quot;&amp;gt;The format string, containing keys like {foo} and {foo:SomeFormat}.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  41:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;attributes&amp;quot;&amp;gt;A &amp;lt;see cref=&amp;quot;Hashtable&amp;quot;/&amp;gt; with keys and values to inject into the string&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  42:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;returns&amp;gt;A version of the formatString string with hastable keys replaced by (formatted) key values.&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  43:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Inject(&lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; formatString, Hashtable attributes)&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  44:  &lt;/span&gt;    {&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  45:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; result = formatString;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  46:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (attributes == &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt; || formatString == &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  47:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; result;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  48:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  49:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; attributeKey &lt;span class=&quot;kwrd&quot;&gt;in&lt;/span&gt; attributes.Keys)&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  50:  &lt;/span&gt;      {&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  51:  &lt;/span&gt;        result = result.InjectSingleValue(attributeKey, attributes[attributeKey]);&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  52:  &lt;/span&gt;      }&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  53:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; result;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  54:  &lt;/span&gt;    }&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  55:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  56:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  57:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// Replaces all instances of a &#39;key&#39; (e.g. {foo} or {foo:SomeFormat}) in a string with an optionally formatted value, and returns the result.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  58:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  59:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;formatString&amp;quot;&amp;gt;The string containing the key; unformatted ({foo}), or formatted ({foo:SomeFormat})&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  60:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;key&amp;quot;&amp;gt;The key name (foo)&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  61:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;replacementValue&amp;quot;&amp;gt;The replacement value; if null is replaced with an empty string&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  62:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;returns&amp;gt;The input string with any instances of the key replaced with the replacement value&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  63:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; InjectSingleValue(&lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; formatString, &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; key, &lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; replacementValue)&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  64:  &lt;/span&gt;    {&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  65:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; result = formatString;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  66:  &lt;/span&gt;      &lt;span class=&quot;rem&quot;&gt;//regex replacement of key with value, where the generic key format is:&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  67:  &lt;/span&gt;      &lt;span class=&quot;rem&quot;&gt;//Regex foo = new Regex(&amp;quot;{(foo)(?:}|(?::(.[^}]*)}))&amp;quot;);&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  68:  &lt;/span&gt;      Regex attributeRegex = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Regex(&lt;span class=&quot;str&quot;&gt;&amp;quot;{(&amp;quot;&lt;/span&gt; + key + &lt;span class=&quot;str&quot;&gt;&amp;quot;)(?:}|(?::(.[^}]*)}))&amp;quot;&lt;/span&gt;);  &lt;span class=&quot;rem&quot;&gt;//for key = foo, matches {foo} and {foo:SomeFormat}&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  69:  &lt;/span&gt;      &lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  70:  &lt;/span&gt;      &lt;span class=&quot;rem&quot;&gt;//loop through matches, since each key may be used more than once (and with a different format string)&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  71:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; (Match m &lt;span class=&quot;kwrd&quot;&gt;in&lt;/span&gt; attributeRegex.Matches(formatString))&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  72:  &lt;/span&gt;      {&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  73:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; replacement = m.ToString();&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  74:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (m.Groups[2].Length &amp;gt; 0) &lt;span class=&quot;rem&quot;&gt;//matched {foo:SomeFormat}&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  75:  &lt;/span&gt;        {&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  76:  &lt;/span&gt;          &lt;span class=&quot;rem&quot;&gt;//do a double string.Format - first to build the proper format string, and then to format the replacement value&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  77:  &lt;/span&gt;          &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; attributeFormatString = &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;.Format(CultureInfo.InvariantCulture, &lt;span class=&quot;str&quot;&gt;&amp;quot;{{0:{0}}}&amp;quot;&lt;/span&gt;, m.Groups[2]);&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  78:  &lt;/span&gt;          replacement = &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;.Format(CultureInfo.CurrentCulture, attributeFormatString, replacementValue);&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  79:  &lt;/span&gt;        }&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  80:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;rem&quot;&gt;//matched {foo}&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  81:  &lt;/span&gt;        {&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  82:  &lt;/span&gt;          replacement = (replacementValue ?? &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt;.Empty).ToString();&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  83:  &lt;/span&gt;        }&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  84:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//perform replacements, one match at a time&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  85:  &lt;/span&gt;        result = result.Replace(m.ToString(), replacement);  &lt;span class=&quot;rem&quot;&gt;//attributeRegex.Replace(result, replacement, 1);&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  86:  &lt;/span&gt;      }&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  87:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; result;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  88:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  89:  &lt;/span&gt;    }&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  90:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  91:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  92:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  93:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// Creates a HashTable based on current object state.&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  94:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;remarks&amp;gt;Copied from the MVCToolkit HtmlExtensionUtility class&amp;lt;/remarks&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  95:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  96:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;param name=&amp;quot;properties&amp;quot;&amp;gt;The object from which to get the properties&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  97:  &lt;/span&gt;    &lt;span class=&quot;rem&quot;&gt;/// &amp;lt;returns&amp;gt;A &amp;lt;see cref=&amp;quot;Hashtable&amp;quot;/&amp;gt; containing the object instance&#39;s property names and their values&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  98:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; Hashtable GetPropertyHash(&lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; properties)&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  99:  &lt;/span&gt;    {&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt; 100:  &lt;/span&gt;      Hashtable values = &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt; 101:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (properties != &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt;)&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt; 102:  &lt;/span&gt;      {&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt; 103:  &lt;/span&gt;        values = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Hashtable();&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt; 104:  &lt;/span&gt;        PropertyDescriptorCollection props = TypeDescriptor.GetProperties(properties);&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt; 105:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt; (PropertyDescriptor prop &lt;span class=&quot;kwrd&quot;&gt;in&lt;/span&gt; props)&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt; 106:  &lt;/span&gt;        {&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt; 107:  &lt;/span&gt;          values.Add(prop.Name, prop.GetValue(properties));&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt; 108:  &lt;/span&gt;        }&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt; 109:  &lt;/span&gt;      }&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt; 110:  &lt;/span&gt;      &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; values;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt; 111:  &lt;/span&gt;    }&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt; 112:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt; 113:  &lt;/span&gt;  }&lt;/pre&gt;

    &lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt; 114:  &lt;/span&gt;}&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;File downloads:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a title=&quot;StringInjectExtesion.cs (5KB)&quot; href=&quot;http://austegard.googlepages.com/StringInjectExtension.cs&quot; target=&quot;_blank&quot;&gt;StringInjectExtension CS file&lt;/a&gt;.&lt;/li&gt;

  &lt;li&gt;&lt;a title=&quot;StringInject.zip (19KB)&quot; href=&quot;http://austegard.googlepages.com/StringInject.zip&quot; target=&quot;_blank&quot;&gt;VisualStudio 2008 project (including 14 unit tests)&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;  &lt;div class=&quot;blogger-post-footer&quot;&gt;http://mo.notono.us&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mo.notono.us/feeds/4857574776604666276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5655646/4857574776604666276' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4857574776604666276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5655646/posts/default/4857574776604666276'/><link rel='alternate' type='text/html' href='http://mo.notono.us/2008/07/c-stringinject-format-strings-by-key.html' title='C#: String.Inject() - Format strings by key tokens'/><author><name>Oskar Austegard</name><uri>http://www.blogger.com/profile/02957780889508741710</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry></feed>