<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>SharePoint Skater</title><link>http://weblogs.asp.net/peterbrunone/default.aspx</link><description>Custom control and client script aficionado, neck-deep in a simmering SharePoint stew.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Agility in SharePoint:  Writing Functional Requirements</title><link>http://weblogs.asp.net/peterbrunone/archive/2012/02/03/writing-requirements.aspx</link><pubDate>Fri, 03 Feb 2012 16:52:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8279589</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=8279589</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2012/02/03/writing-requirements.aspx#comments</comments><description>&lt;p&gt;SharePoint brings more power than ever to the end user.&amp;nbsp; As usual, this is a double-edged sword.&amp;nbsp; Its utility as a development platform is unmatched, but since many of the development tools are accessible from the browser UI, the dividing lines can get blurred.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Requirements-gathering (and subsequent documentation) can be tricky, and it's easy for us technical types to get confused about functional versus technical.&amp;nbsp; Business users do not care about technical requirements and they should not have the opportunity to dictate them.&amp;nbsp; If you have to explain a term (for example, "list" or "metadata column") to an end user, then most likely it does not belong under the heading of "functional requirements".&lt;/p&gt;&lt;p&gt;Functional requirements are about what the end user needs to accomplish.&amp;nbsp; An excellent guide for this is the concept of the User Story, as employed in Agile 
project management (we're kind of big on that here at Improving).&amp;nbsp; The basic format is as follows:&lt;br&gt;
&lt;br&gt;As a _______ (what type of user), &lt;br&gt;&lt;br&gt;I want _________&lt;br&gt;&lt;br&gt;so that I can ___________&lt;br&gt;&lt;br&gt;This
 kind of requirement requires (heh) that you also define acceptance 
criteria, by which you can determine that the
 requirement has been fulfilled. The end result is that nobody can claim confusion about what you're trying to do, since the team has already agreed on the definition of "done".&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8279589" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/agile/default.aspx">agile</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/General+Software+Development/default.aspx">General Software Development</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category></item><item><title>Non-technical hiatus:  Movember</title><link>http://weblogs.asp.net/peterbrunone/archive/2011/11/29/non-technical-hiatus-movember.aspx</link><pubDate>Tue, 29 Nov 2011 16:20:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8080872</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=8080872</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2011/11/29/non-technical-hiatus-movember.aspx#comments</comments><description>&lt;p&gt;Here at &lt;a href="http://improvingenterprises.com" mce_href="http://improvingenterprises.com"&gt;Improving Enterprises&lt;/a&gt;, we have a relatively new annual tradition of forming a moustache team for Movember.&amp;nbsp; For those who are new to the concept, Movember is a month-long fundraising effort for men's cancer research.&amp;nbsp; Each year, men (Mo Bros) from around the world join in sprouting a symbol of solidarity -- with the goal of eradicating men's cancers.&lt;/p&gt;&lt;p&gt;If you're able, &lt;a href="http://mobro.co/PeterBrunone" title="Peter Brunone's Mo Site" mce_href="http://mobro.co/PeterBrunone"&gt;please consider donating&lt;/a&gt; to this vital effort.&amp;nbsp; You can read up on where the money goes and how it is spent, you can learn about the history of Movember, and of course you can see goofy pictures of me with incomplete facial hair (if you're into that sort of thing).&lt;/p&gt;&lt;p&gt;Thank you for your time, your money, or merely your attention.&amp;nbsp; To show my gratitude, here's what the genetic recombination of Burt Reynolds and Derek Zoolander would look like if he had some sort of mental problem. &lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;img src="http://static.movember.com/uploads/2011/profiles/fb4/792/fb479244b45949c300e9d1721ab17869-4ed5055639f51-hero.jpg" title="My 'stachitude." alt="My 'stachitude." mce_src="http://static.movember.com/uploads/2011/profiles/fb4/792/fb479244b45949c300e9d1721ab17869-4ed5055639f51-hero.jpg" align="top" height="400"&gt; &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8080872" width="1" height="1"&gt;</description></item><item><title>"The requested operation requires elevation"</title><link>http://weblogs.asp.net/peterbrunone/archive/2011/07/13/quot-the-requested-operation-requires-elevation-quot.aspx</link><pubDate>Wed, 13 Jul 2011 21:20:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7868778</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7868778</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2011/07/13/quot-the-requested-operation-requires-elevation-quot.aspx#comments</comments><description>&lt;p&gt;Typical SharePoint 2010 install.&amp;nbsp; I had created all my domain users, set up my servers, and started installing the prerequisites.&amp;nbsp; When the first box in the farm restarted and the preparation utility came up, I was asked for credentials and provided them, only to be rejected.&amp;nbsp; At first I thought it was a standard "access denied" error, but a look at the fine print revealed the error titling this post.&lt;/p&gt;&lt;p&gt;I tried Run As Administrator; still no success.&lt;/p&gt;&lt;p&gt;Eventually I realized that I was signed in as the farm account, though I had not yet made it a local administrator.&amp;nbsp; I right-clicked Computer Management, ran THAT with the proper credentials, made the farm account local admin, and all was right with the world.&lt;/p&gt;&lt;p&gt;Sometimes it's the little things. &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7868778" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/sharepoint+configuration/default.aspx">sharepoint configuration</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/sharepoint+installation/default.aspx">sharepoint installation</category></item><item><title>"The data source control failed to execute the insert (or update) command", or How to Make Your Workday a Bit Shorter</title><link>http://weblogs.asp.net/peterbrunone/archive/2011/05/27/quot-the-data-source-control-failed-to-execute-the-insert-or-update-command-quot-or-how-to-make-your-workday-a-bit-shorter.aspx</link><pubDate>Fri, 27 May 2011 16:08:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7806016</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7806016</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2011/05/27/quot-the-data-source-control-failed-to-execute-the-insert-or-update-command-quot-or-how-to-make-your-workday-a-bit-shorter.aspx#comments</comments><description>&lt;p&gt;Custom list.&amp;nbsp; Custom New/Edit/View forms.&amp;nbsp; Everything works perfectly... until the latest round of updates.&lt;/p&gt;&lt;p&gt;Now if you Bingle this error message, you'll get about twenty possible causes that run the gamut from a known bug, an unknown bug, and fixed/not fixed/hotfixed/workaround bug, all the way to corrupt content types and invalid form data.&lt;/p&gt;&lt;p&gt;In my case, however, it turned out to be a misspelled column name in a FormField control.&lt;/p&gt;&lt;p&gt;I'm just glad it's Friday. &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7806016" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Designer/default.aspx">SharePoint Designer</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/sharepoint+error/default.aspx">sharepoint error</category></item><item><title>Removing the 12:00 timestamp from Calendar View</title><link>http://weblogs.asp.net/peterbrunone/archive/2011/05/04/removing-the-12-00-timestamp-from-calendar-view.aspx</link><pubDate>Wed, 04 May 2011 21:33:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7776810</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7776810</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2011/05/04/removing-the-12-00-timestamp-from-calendar-view.aspx#comments</comments><description>

&lt;p&gt;Occasionally, you have a calendar full of all-day events and you don't want the calendar cluttered up with redundant timestamps.&amp;nbsp; Here's a simple client-side script, suitable for framing (or a master page, or a content editor web part) that will cut down on the visual noise. &lt;br&gt;&lt;/p&gt;
&lt;pre&gt;&amp;lt;script language="JavaScript"&amp;gt;
var allDates = document.getElementsByTagName("nobr");
for(var i=0;i&lt;alldates.length;i++) {="" if(alldates[i].innerhtml.indexof(="" 12:00="" )=""&gt; 0) {
      allDates[i].innerHTML = allDates[i].innerHTML.replace("12:00 AM","");
    }
  }
&amp;lt;/script&amp;gt;
&lt;/alldates.length;i++)&gt;&lt;/pre&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7776810" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category></item><item><title>Nitpicking that matters: changing default forms on a SharePoint 2007 list</title><link>http://weblogs.asp.net/peterbrunone/archive/2011/04/20/nitpicking-that-matters-changing-default-forms-on-a-sharepoint-2007-list.aspx</link><pubDate>Wed, 20 Apr 2011 19:34:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7765891</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7765891</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2011/04/20/nitpicking-that-matters-changing-default-forms-on-a-sharepoint-2007-list.aspx#comments</comments><description>&lt;p&gt;This is a fairly common request, but the solution is often missing one crucial point.&amp;nbsp; To use a custom New/Edit/Display form on your list, proceed as follows:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Open your site in SharePoint Designer.&lt;/li&gt;&lt;li&gt;Right-click the desired List (under the Lists node) and select &lt;b&gt;Properties&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Click the &lt;b&gt;Supporting Files&lt;/b&gt; tab.&lt;/li&gt;&lt;li&gt;Under &lt;b&gt;Content type specific forms&lt;/b&gt;, select the &lt;b&gt;Item&lt;/b&gt; content type &lt;i&gt;(this is the part most people forget)&lt;/i&gt;.&amp;nbsp; If you are using a custom content type, select that; just make sure that the &lt;b&gt;Folder&lt;/b&gt; type is NOT selected.&lt;/li&gt;&lt;li&gt;Use the &lt;b&gt;Browse&lt;/b&gt; button to select your custom forms in each category.&lt;/li&gt;&lt;li&gt;Click &lt;b&gt;OK&lt;/b&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7765891" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Designer/default.aspx">SharePoint Designer</category></item><item><title>SharePoint Designer workflow workarounds:  tracking individual column changes</title><link>http://weblogs.asp.net/peterbrunone/archive/2011/03/07/workflow-workarounds-tracking-individual-column-changes.aspx</link><pubDate>Mon, 07 Mar 2011 15:46:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7717268</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7717268</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2011/03/07/workflow-workarounds-tracking-individual-column-changes.aspx#comments</comments><description>&lt;p&gt;This post is long overdue, but since the question keeps popping up on various SharePoint discussion lists, I figured I'd document the answer here (next time I can just post a link instead of typing the whole thing out again).&lt;/p&gt;&lt;p&gt;In a SPD workflow, you cannot trigger a SharePoint workflow when a column changes; you can only use the ItemChanged event.&amp;nbsp; To get more granular, then, you need to add some extra bits.&lt;/p&gt;&lt;p&gt;Let's say you have a list called "5K Races" with a column called StartTime, and you want to execute some actions when the StartTime value changes.&amp;nbsp; Simply perform the following steps:&lt;/p&gt;&lt;p&gt;1)&amp;nbsp; Create an additional column (same datatype) called OldStartTime.&lt;/p&gt;&lt;p&gt;2)&amp;nbsp; When the workflow starts, compare StartTime to OldStartTime.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp; a) If they are equal, then do nothing (end).&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp; b) If they are NOT equal, proceed with your workflow.&lt;/p&gt;&lt;p&gt;3)&amp;nbsp; If 2b, then set OldStartTime to the value of StartTime.&lt;/p&gt;&lt;p&gt;By performing step 3, you ensure that by the end of the workflow, OldStartTime will be equal to StartTime -- this is important because the workflow will continue to run every time a particular item is changed, but by taking away the criterion that would cause the workflow to run the second time, you have avoided an endless loop situation.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7717268" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Designer/default.aspx">SharePoint Designer</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/sharepoint+workflow/default.aspx">sharepoint workflow</category></item><item><title>Read-only lock on a SharePoint site collection, or Why can't I edit anymore?</title><link>http://weblogs.asp.net/peterbrunone/archive/2011/03/01/read-only-lock-on-a-sharepoint-site-collection-or-why-can-t-i-edit-anymore.aspx</link><pubDate>Tue, 01 Mar 2011 16:01:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7714476</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7714476</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2011/03/01/read-only-lock-on-a-sharepoint-site-collection-or-why-can-t-i-edit-anymore.aspx#comments</comments><description>&lt;p&gt;Monday morning, the calls started.&amp;nbsp; For some reason, long-time users were unable to edit list items.&amp;nbsp; I figured we had a permissions issue, so I popped in to look at the Site Settings -- and found that I couldn't.&amp;nbsp; A quick trip to Central Administration showed that I was still listed as a Site Collection Administrator, but I had no power at all on the site collection in question.&lt;/p&gt;&lt;p&gt;A quick glance at the logs told me that the server had recently shut down unexpectedly (this is a Hyper-V virtual machine).&amp;nbsp; Apparently, in the confusion, somehow SharePoint decided to lock the site collection as Read Only.&amp;nbsp; This can be remedied in one of two ways:&lt;/p&gt;&lt;p&gt;1)&amp;nbsp; In Central Administration, go to Application Management-&amp;gt;SharePoint Site Management-&amp;gt;Site collection quotas and locks.&amp;nbsp; Once you have arrived, select the correct application and site collection, and you will have the opportunity to view and set the lock status of the collection (it most likely will be set to "Read-only", and you'll want to move that radio button to "Not locked").&lt;/p&gt;&lt;p&gt;2)&amp;nbsp; Fire up stsadm and issue the following command:&lt;/p&gt;&lt;p&gt;stsadm -o setsitelock -url http://myportalsitecollection -lock none &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7714476" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category></item><item><title>Phone number mask in a DataView WebPart (DVWP)</title><link>http://weblogs.asp.net/peterbrunone/archive/2010/12/07/phone-number-mask-in-a-dataview-webpart-dvwp.aspx</link><pubDate>Tue, 07 Dec 2010 16:34:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7657753</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7657753</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2010/12/07/phone-number-mask-in-a-dataview-webpart-dvwp.aspx#comments</comments><description>&lt;p&gt;This came up today on the [sharepointdiscussions] list.&amp;nbsp; A user needed to display a read-only field in a phone number format; it's pretty simple, but it may be just what you need.&lt;/p&gt;&lt;p&gt;Assuming your list item contains a field called "Phone Number" (with a space), the following XPath will give you a number in the classic US telephone format: &lt;br&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;xsl:value-of select="concat('(',substring(@Phone_x0020_Number,1,3),')',substring(@Phone_x0020_Number,4,3),'-',substring(@Phone_x0020_Number,7,4))" /&amp;gt; &lt;/p&gt;&lt;p&gt;If you need to mask an input, try &lt;a href="http://spdeveloper.net/tag/jquery/" mce_href="http://spdeveloper.net/tag/jquery/"&gt;this jQuery solution&lt;/a&gt;. &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7657753" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Designer/default.aspx">SharePoint Designer</category></item><item><title>Generate a Word document from list data</title><link>http://weblogs.asp.net/peterbrunone/archive/2010/12/06/generate-a-word-document-from-list-data.aspx</link><pubDate>Mon, 06 Dec 2010 16:24:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7656953</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7656953</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2010/12/06/generate-a-word-document-from-list-data.aspx#comments</comments><description>
&lt;p&gt;This came up on a discussion list lately, so I threw together some code to meet the need.&amp;nbsp; In short, a colleague needed to take the results of an InfoPath form survey and give them to the user in Word format.&amp;nbsp; The form data was already in a list item, so it was a simple matter of using the SharePoint API to get the list item, formatting the data appropriately, and using response headers to make the client machine treat the response as MS Word content.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The following rudimentary code can be run in an ASPX (or an assembly) in the 12 hive.&amp;nbsp; When you link to the page, send the list name and item ID in the querystring and use them to grab the appropriate data.&lt;/p&gt;
&lt;p style="font-family: courier new;"&gt;// Clear the current response headers and set them up to look like a word doc.&lt;br&gt;HttpContext.Current.Response.Clear();&lt;br&gt;HttpContext.Current.Response.Charset ="";&lt;br&gt;HttpContext.Current.Response.ContentType ="application/msword";&lt;br&gt;string strFileName = "ThatWordFileYouWanted"+ ".doc";&lt;br&gt;HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;filename=" + strFileName);&lt;br&gt;&lt;br&gt;// Using the current site, get the List by name and then the Item by ID (from the URL).&lt;br&gt;string myListName = HttpContext.Current.Request.Querystring["listName"];&lt;br&gt;int myID = Convert.ToInt32(HttpContext.Current.Request.Querystring["itemID"]);&lt;br&gt;SPSite oSite = SPContext.Current.Site;&lt;br&gt;SPWeb oWeb = oSite.OpenWeb();&lt;br&gt;SPList oList = oWeb.Lists["MyListName"];&lt;br&gt;SPListItem oListItem = oList.Items.GetItemById(myID);&lt;br&gt;&lt;br&gt;// Build a string with the data -- format it with HTML if you like. &lt;br&gt;StringBuilder strHTMLContent = newStringBuilder();&lt;br&gt;&lt;br&gt;// *&lt;br&gt;// Here's where you pull individual fields out of the list item.&lt;br&gt;// *&lt;br&gt;&lt;br&gt;// Once everything is ready, spit it out to the client machine.&lt;br&gt;&lt;br&gt;HttpContext.Current.Response.Write(strHTMLContent);&lt;br&gt;HttpContext.Current.Response.End();&lt;br&gt;HttpContext.Current.Response.Flush(); &lt;br&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7656953" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/.net/default.aspx">.net</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/asp.net/default.aspx">asp.net</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category></item><item><title>Simple Pleasures in SP 2010:  TryGetList method</title><link>http://weblogs.asp.net/peterbrunone/archive/2010/10/05/sp-2010-joy-trygetlist-method.aspx</link><pubDate>Tue, 05 Oct 2010 17:19:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7623945</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7623945</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2010/10/05/sp-2010-joy-trygetlist-method.aspx#comments</comments><description>&lt;p&gt;How many times has this happened to you?&lt;/p&gt;

&lt;p&gt;SPSite site = new SPSite("url");&lt;br&gt;
SPWeb web = site.OpenWeb();&lt;br&gt;
SPList list = web.Lists["ListName"];&lt;br&gt;
ERROR!!! &lt;/p&gt;&lt;p&gt;...because, of course, that list happens not to exist!&amp;nbsp; Have you ever wished for a better approach than either "Try...Catch" or "loop through the whole mess"?&lt;/p&gt;&lt;p&gt;You just got your wish.&lt;/p&gt;&lt;p&gt;SharePoint 2010 includes a brand-new method on the SPListCollection, called &lt;b&gt;TryGetList&lt;/b&gt;.&amp;nbsp; This method returns a list if successful, but if not, it returns -- get this -- a null value!&amp;nbsp; No more clumsy extra logic blocks every time you need to do something simple like grabbing a list.&amp;nbsp; It's not rocket science, but the great innovations rarely are.&lt;br&gt;&lt;/p&gt;

&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7623945" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category></item><item><title>FBA and the SSPPP (Shared Service Provider People Picker)</title><link>http://weblogs.asp.net/peterbrunone/archive/2010/09/10/fba-and-the-ssppp-shared-service-provider-people-picker.aspx</link><pubDate>Fri, 10 Sep 2010 18:45:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7609119</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7609119</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2010/09/10/fba-and-the-ssppp-shared-service-provider-people-picker.aspx#comments</comments><description>&lt;p&gt;This week, I had to create a few profiles (by hand) for Forms Auth user accounts.&amp;nbsp; Of course, in order to do this, you need to make sure the SSP's People Picker can recognize them.&amp;nbsp; I dutifully added the provider info and the requisite connection string to the SSP web.config, spun it up, and... nothing.&amp;nbsp; It had no idea who these users were.&lt;/p&gt;&lt;p&gt;I tried saving the web.config file again. I tried restarting the IIS website and the app pool.&amp;nbsp; I ran iisreset, and even rebooted the server.&amp;nbsp; I added every MOSS account imaginable to the membership database as a DBO (just to be sure).&lt;/p&gt;&lt;p&gt;Still, nothing worked.&lt;/p&gt;&lt;p&gt;Finally -- in a fit of "this is so stupid that it can't possibly work but I have to try it" -- I went to Central Admin -&amp;gt; Application Management, extended the SSP application, and implemented FBA on the newly-created IIS website.&lt;/p&gt;&lt;p&gt;Lo and behold, the crazy thing started up again and recognized my users, and I could create a new profile based on a forms auth user from the membership database.&lt;/p&gt;&lt;p&gt;Maybe someday I'll investigate the why of this; for now, I'm just glad it works.&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7609119" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/asp.net/default.aspx">asp.net</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Forms+Authentication/default.aspx">Forms Authentication</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category></item><item><title>SharePoint Designer does it again</title><link>http://weblogs.asp.net/peterbrunone/archive/2010/06/30/sharepoint-designer-does-it-again.aspx</link><pubDate>Wed, 30 Jun 2010 10:02:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7549091</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7549091</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2010/06/30/sharepoint-designer-does-it-again.aspx#comments</comments><description>&lt;p&gt;Did you know that when you're working on custom Edit form and add an extra field via the Columns command, SharePoint Designer will sometimes add the field in Insert mode instead of Update mode?&amp;nbsp; Yes, it will.&amp;nbsp; Sometimes.&amp;nbsp; The binding portion of the field should look like this:&lt;/p&gt;&lt;p&gt;__designer:bind="{ddwrt:DataBind('u',concat('ff68',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Egg_x0020_Prices)}" &lt;/p&gt;&lt;p&gt;...but instead, it looks like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;__designer:bind="{ddwrt:DataBind('i',concat('ff68',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Egg_x0020_Prices')}" &lt;/p&gt;&lt;p&gt;That little "i" will make all the difference in the world.&amp;nbsp; You'll chase that form all over town, wondering why it's not showing the current price of eggs in the country of your choice, because it's certainly listed correctly in the List Item... and finally you'll flip that little letter from "i" to "u" and feel really silly for wasting all that time on something so small.&lt;/p&gt;&lt;p&gt;...or so I've read.&amp;nbsp; You know, about people who had that happen to them.&amp;nbsp; Certainly not me. &lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7549091" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Designer/default.aspx">SharePoint Designer</category></item><item><title>Audiencing with Forms-Based Authentication (FBA)</title><link>http://weblogs.asp.net/peterbrunone/archive/2010/06/17/audiencing-with-forms-based-authentication-fba.aspx</link><pubDate>Thu, 17 Jun 2010 22:14:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7534798</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7534798</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2010/06/17/audiencing-with-forms-based-authentication-fba.aspx#comments</comments><description>&lt;p&gt;This really is no different from when you create an audience with regular old NTLM (Windows Authentication).&amp;nbsp; The difference is that while the AD provider is set up by default in all environments, the extra membership provider (that you use for Forms Authentication) isn't included anywhere except in the web application where you install it.&amp;nbsp; To be able to find your FBA users in the audience creation tool, you'll need to add the extra membership provider(s) to the web.config for your SSP site in IIS.&amp;nbsp; At that point, the People Picker should start recognizing your Forms Auth users, and you can create your audience as needed.&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7534798" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/asp.net/default.aspx">asp.net</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Forms+Authentication/default.aspx">Forms Authentication</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category></item><item><title>Why is my content database so large?</title><link>http://weblogs.asp.net/peterbrunone/archive/2010/06/14/why-is-my-content-database-so-large.aspx</link><pubDate>Tue, 15 Jun 2010 04:06:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7531094</guid><dc:creator>PeterBrunone</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/peterbrunone/rsscomments.aspx?PostID=7531094</wfw:commentRss><comments>http://weblogs.asp.net/peterbrunone/archive/2010/06/14/why-is-my-content-database-so-large.aspx#comments</comments><description>&lt;p&gt;If your SharePoint site collection hasn't grown, but your content database has, the most likely culprit is versioning.&amp;nbsp; If a list -- or worse, a library -- has versioning enabled, the default is to keep every single one.&amp;nbsp; That means that every time someone edits and checks in a document, its storage footprint increases by the size of the document (and probably a little more).&lt;/p&gt;&lt;p&gt;The solution?&amp;nbsp; It could be a bit painful, but you'll need to go back into each library and restrict the number of versions to keep (three is sufficient for most uses, but your needs may vary).&amp;nbsp; I suggest keeping only major versions as well, since minor versions are really just stopping points on the way to a published document.&lt;/p&gt;&lt;p&gt;Of course if you have a real business need to keep all those versions around, then you'll want to look into an &lt;a href="http://www.google.com/search?q=sharepoint+archiving+solution" mce_href="http://www.google.com/search?q=sharepoint+archiving+solution"&gt;archiving solution&lt;/a&gt; that will take the old versions out of the content database but still make them available if necessary.&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7531094" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/peterbrunone/archive/tags/Sharepoint/default.aspx">Sharepoint</category></item></channel></rss>
