<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>freachable.net - SharePoint</title>
    <link>http://freachable.net/</link>
    <description>Next generation's garbage</description>
    <language>en-us</language>
    <copyright>Hafthor Stefansson</copyright>
    <lastBuildDate>Mon, 18 Jan 2010 18:18:53 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.1.8102.813</generator>
    <managingEditor>blog@freachable.net</managingEditor>
    <webMaster>blog@freachable.net</webMaster>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=1fb8e017-9cf6-484f-96a0-53013e99aa3d</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,1fb8e017-9cf6-484f-96a0-53013e99aa3d.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,1fb8e017-9cf6-484f-96a0-53013e99aa3d.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1fb8e017-9cf6-484f-96a0-53013e99aa3d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">We have a client that has a WSS3 install
with a single site, but wants to start creating sites for each functional group inside
their organization. The bummer was WSS3's search was limited to a single site. Well,
we could just replace it with Search Server 2008 Express, but that runs over SQL Server
2005 Express and is limited to 4GB on the databases so it would be a hassle to manage
when it gets big.<br /><br />
The answer is to use both.<br /><br />
Here's the steps to make a test environment for this from scratch:<br /><ol><li>
Make a virt using Windows 2003 R2 w/ SP2</li><li>
Add web server role<br /></li><li>
Windows Update</li><li>
Install WSS3 w/ SP2 which gets me the Window Internal Database (not limited to 4GB)
for SharePoint content.</li><li>
Let the Configuration Wizard do its magic.</li><li>
Install Search Server 2008 Express</li><li>
Let the Configuration Wizard do its magic again but don't let it replace your WSS3
site - tell it to make a new search site on a random port.</li><li>
Turn on the "Office SharePoint Server Search Web Parts" site collection feature on
the WSS3 site</li><li>
Install SharePoint Designer 2007</li><li>
Open the Search Server site's /results.aspx page</li><li>
Save as to WSS3 site as /results.aspx (with Don't save for the images/css junk)</li><li>
Add a Search Box webpart to the /default.aspx page of your wss3 site setting the "Target
search results page URL" to /result.aspx<br /></li></ol>
To test, I created a subsite and uploaded a sample document to a doc lib there (/inetpub/wwwroot/iisstart.htm)
- let a crawl happen then searched from the root site for the word "Construction".<br /><br />
Now to tune this a little better, you might want to set the memory limits on the two
instances of SQL running on this box now (MICROSOFT##SSEE and OFFICESERVERS). My understanding
is that SQL server is super memory greedy, but the express and WID versions are less
so but they still will probably push at each others memory causing them to drop cache
buffers and page out IIS, ASP.NET and SP core stuff, so better to limit them.<br /><br />
I did this by creating the following text file (sqlconfig.txt):<br /><blockquote>EXEC sys.sp_configure N'show advanced options', N'1'  RECONFIGURE
WITH OVERRIDE<br />
GO<br />
EXEC sys.sp_configure N'max server memory (MB)', N'256' -- &lt;== mod this value to
around 1/4 of installed memory - 1024 max<br />
GO<br />
RECONFIGURE WITH OVERRIDE<br />
GO<br />
EXEC sys.sp_configure N'show advanced options', N'0'  RECONFIGURE WITH OVERRIDE<br />
GO<br /></blockquote>Then I ran this from the command line:<br /><blockquote>sqlcmd -S localhost\MICROSOFT##SSEE -E -i sqlconfig.txt<br />
sqlcmd -S localhost\OFFICESERVERS -E -i sqlconfig.txt<br /></blockquote><br /><br /><br /><p></p><img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=1fb8e017-9cf6-484f-96a0-53013e99aa3d" /></body>
      <title>Add global search to WSS3 using Search Server 2008 Express</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,1fb8e017-9cf6-484f-96a0-53013e99aa3d.aspx</guid>
      <link>http://freachable.net/2010/01/18/AddGlobalSearchToWSS3UsingSearchServer2008Express.aspx</link>
      <pubDate>Mon, 18 Jan 2010 18:18:53 GMT</pubDate>
      <description>We have a client that has a WSS3 install with a single site, but wants to start creating sites for each functional group inside their organization. The bummer was WSS3's search was limited to a single site. Well, we could just replace it with Search Server 2008 Express, but that runs over SQL Server 2005 Express and is limited to 4GB on the databases so it would be a hassle to manage when it gets big.&lt;br&gt;
&lt;br&gt;
The answer is to use both.&lt;br&gt;
&lt;br&gt;
Here's the steps to make a test environment for this from scratch:&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;
Make a virt using Windows 2003 R2 w/ SP2&lt;/li&gt;
&lt;li&gt;
Add web server role&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
Windows Update&lt;/li&gt;
&lt;li&gt;
Install WSS3 w/ SP2 which gets me the Window Internal Database (not limited to 4GB)
for SharePoint content.&lt;/li&gt;
&lt;li&gt;
Let the Configuration Wizard do its magic.&lt;/li&gt;
&lt;li&gt;
Install Search Server 2008 Express&lt;/li&gt;
&lt;li&gt;
Let the Configuration Wizard do its magic again but don't let it replace your WSS3
site - tell it to make a new search site on a random port.&lt;/li&gt;
&lt;li&gt;
Turn on the "Office SharePoint Server Search Web Parts" site collection feature on
the WSS3 site&lt;/li&gt;
&lt;li&gt;
Install SharePoint Designer 2007&lt;/li&gt;
&lt;li&gt;
Open the Search Server site's /results.aspx page&lt;/li&gt;
&lt;li&gt;
Save as to WSS3 site as /results.aspx (with Don't save for the images/css junk)&lt;/li&gt;
&lt;li&gt;
Add a Search Box webpart to the /default.aspx page of your wss3 site setting the "Target
search results page URL" to /result.aspx&lt;br&gt;
&lt;/li&gt;
&lt;/ol&gt;
To test, I created a subsite and uploaded a sample document to a doc lib there (/inetpub/wwwroot/iisstart.htm)
- let a crawl happen then searched from the root site for the word "Construction".&lt;br&gt;
&lt;br&gt;
Now to tune this a little better, you might want to set the memory limits on the two
instances of SQL running on this box now (MICROSOFT##SSEE and OFFICESERVERS). My understanding
is that SQL server is super memory greedy, but the express and WID versions are less
so but they still will probably push at each others memory causing them to drop cache
buffers and page out IIS, ASP.NET and SP core stuff, so better to limit them.&lt;br&gt;
&lt;br&gt;
I did this by creating the following text file (sqlconfig.txt):&lt;br&gt;
&lt;blockquote&gt;EXEC sys.sp_configure N'show advanced options', N'1'&amp;nbsp; RECONFIGURE
WITH OVERRIDE&lt;br&gt;
GO&lt;br&gt;
EXEC sys.sp_configure N'max server memory (MB)', N'256' -- &amp;lt;== mod this value to
around 1/4 of installed memory - 1024 max&lt;br&gt;
GO&lt;br&gt;
RECONFIGURE WITH OVERRIDE&lt;br&gt;
GO&lt;br&gt;
EXEC sys.sp_configure N'show advanced options', N'0'&amp;nbsp; RECONFIGURE WITH OVERRIDE&lt;br&gt;
GO&lt;br&gt;
&lt;/blockquote&gt;Then I ran this from the command line:&lt;br&gt;
&lt;blockquote&gt;sqlcmd -S localhost\MICROSOFT##SSEE -E -i sqlconfig.txt&lt;br&gt;
sqlcmd -S localhost\OFFICESERVERS -E -i sqlconfig.txt&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=1fb8e017-9cf6-484f-96a0-53013e99aa3d" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,1fb8e017-9cf6-484f-96a0-53013e99aa3d.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=a84dd6c8-7046-4934-9d09-40bd69bcad8d</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,a84dd6c8-7046-4934-9d09-40bd69bcad8d.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,a84dd6c8-7046-4934-9d09-40bd69bcad8d.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a84dd6c8-7046-4934-9d09-40bd69bcad8d</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">SharePoint has a great API for most things,
but some of things seem a bit lacking.<br /><br />
I recently had a need to auto-create folders inside a document library. Basically,
like mkdir with command extensions does on the command line. If directory x exists,
but x\y doesn't, mkdir x\y\z will mkdir x\y and mkdir x\y\z.<br /><br />
After some struggling, here's what I ended up with:<br /><br />
    <font color="#0000ff">Public Shared Sub</font> CreateDocLibFolders(<font color="#0000ff">ByVal </font>url <font color="#0000ff">As
String</font>)<br />
        <font color="#0000ff">Using</font> site <font color="#0000ff">As </font>New
SPSite(url)<br />
            <font color="#0000ff">Using </font>web <font color="#0000ff">As </font>SPWeb
= site.OpenWeb()<br />
                <font color="#0000ff">If </font>url.StartsWith(web.Url) <font color="#0000ff">Then</font><br />
                    <font color="#0000ff">Dim </font>folder <font color="#0000ff">As </font>SPFolder
= web.RootFolder<br />
                    <font color="#0000ff">For
Each </font>segment <font color="#0000ff">As </font>String <font color="#0000ff">In </font>url.Substring(web.Url.Length
+ 1).Split(<font color="#a52a2a">"/"</font>)<br />
                        <font color="#0000ff">Dim </font>nextfolder <font color="#0000ff">As </font>SPFolder
= web.GetFolder(folder.Url &amp; IIf(folder.Url.Length &gt; 0, <font color="#a52a2a">"/"</font>, <font color="#a52a2a">""</font>)
&amp; segment)<br />
                        <font color="#0000ff">If
Not</font> nextfolder.Exists <font color="#0000ff">Then</font><br />
                           
folder = folder.SubFolders.Add(nextfolder.Name)<br /><font color="#0000ff">                       
Else</font><br />
                           
folder = nextfolder<br /><font color="#0000ff">                       
End If<br />
                   
Next<br />
               
End If<br />
            End Using<br />
        End Using<br />
    End Sub</font><br /><br />
Okay, I know it doesn't look like much, but that code represents some hard won knowledge.
The main thing was dealing with folders that had spaces in them. Before, I was System.Web.HttpUtility.UrlDecode()ing
them, but my use of .Name on a .Exists=false proved to be much more elegant. Even
though I'm doing a GetFolder on a escaped url, the .Name property returns a nice,
suitable for passing into SubFolders.Add(), de%20ed name. But why use this ugly indirect
path string building technique? Well, I could not find an exception-free way of doing
existence testing of a folder other than web.GetFolder() which, of course, needs a
web relative url -- this lead to the more clunky looking GetFolder expression.<br /><blockquote><font color="#0000ff">RaiseEvent </font>OnReligiousArgument<br /></blockquote>For the two people that read this blog (me and uh, that might be an exagerated
figure) the reason my snippets have been in VB.NET lately is because I think VB.NET
is underloved in the SharePoint community. VSEWSS, for example, is a C# only club.
Heck with that. It doesn't provide enough juice to justify the opaqueness of its wsp
builder. VB.NET has some nice features and I like taking advantage of them -- I know
both cold and I make no apologies for choosing VB.NET. If you are one of those C#
1337ists... run the benchmarks and tell me its so much better. Tell me what it does
so much better that it makes up for the utter lack of exception filters, XML literals
(VB9), pleasant event raising, beyond 1980s-era switch/select case, optional parameters,
automatic by-reference parameters for callers, array resizing, and procedure scoped
static vars. I'm not saying C# is worse -- it's like the difference between ibuprofen
and acetaminophen. Minor advantages in some edge cases both ways but they all fix
most headaches.<br /><br />
I've seen some comparisons between the two languages before on the net, but none seemed
entirely complete. If I ever am put in jail with nothing but a toilet and a laptop
for a few years, perhaps I'd blog /the/ definitive list.<br /><br />
For those of you thinking of writing in your reasons why C# is soooo superior to VB.NET,
please refer to the <a href="http://en.wikipedia.org/wiki/Logical_fallacy">Logical
Fallacy article on Wikipedia</a> before embarrassing yourself. Reasons like "real
programmers use semicolons" or "only a moron would use a language with the word 'basic'
in the name" will be ridiculed mercilessly. There are some valid arguments for C#
and one could make an equally compelling valid case for it over VB.NET.<br /><p></p><img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=a84dd6c8-7046-4934-9d09-40bd69bcad8d" /></body>
      <title>SharePoint document library folders / Language rant</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,a84dd6c8-7046-4934-9d09-40bd69bcad8d.aspx</guid>
      <link>http://freachable.net/2008/06/19/SharePointDocumentLibraryFoldersLanguageRant.aspx</link>
      <pubDate>Thu, 19 Jun 2008 09:20:09 GMT</pubDate>
      <description>SharePoint has a great API for most things, but some of things seem a bit lacking.&lt;br&gt;
&lt;br&gt;
I recently had a need to auto-create folders inside a document library. Basically,
like mkdir with command extensions does on the command line. If directory x exists,
but x\y doesn't, mkdir x\y\z will mkdir x\y and mkdir x\y\z.&lt;br&gt;
&lt;br&gt;
After some struggling, here's what I ended up with:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Public Shared Sub&lt;/font&gt; CreateDocLibFolders(&lt;font color="#0000ff"&gt;ByVal &lt;/font&gt;url &lt;font color="#0000ff"&gt;As
String&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Using&lt;/font&gt; site &lt;font color="#0000ff"&gt;As &lt;/font&gt;New
SPSite(url)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;Using &lt;/font&gt;web &lt;font color="#0000ff"&gt;As &lt;/font&gt;SPWeb
= site.OpenWeb()&lt;br&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; &lt;font color="#0000ff"&gt;If &lt;/font&gt;url.StartsWith(web.Url) &lt;font color="#0000ff"&gt;Then&lt;/font&gt;
&lt;br&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; &lt;font color="#0000ff"&gt;Dim &lt;/font&gt;folder &lt;font color="#0000ff"&gt;As &lt;/font&gt;SPFolder
= web.RootFolder&lt;br&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; &lt;font color="#0000ff"&gt;For
Each &lt;/font&gt;segment &lt;font color="#0000ff"&gt;As &lt;/font&gt;String &lt;font color="#0000ff"&gt;In &lt;/font&gt;url.Substring(web.Url.Length
+ 1).Split(&lt;font color="#a52a2a"&gt;"/"&lt;/font&gt;)&lt;br&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; &lt;font color="#0000ff"&gt;Dim &lt;/font&gt;nextfolder &lt;font color="#0000ff"&gt;As &lt;/font&gt;SPFolder
= web.GetFolder(folder.Url &amp;amp; IIf(folder.Url.Length &amp;gt; 0, &lt;font color="#a52a2a"&gt;"/"&lt;/font&gt;, &lt;font color="#a52a2a"&gt;""&lt;/font&gt;)
&amp;amp; segment)&lt;br&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; &lt;font color="#0000ff"&gt;If
Not&lt;/font&gt; nextfolder.Exists &lt;font color="#0000ff"&gt;Then&lt;/font&gt;
&lt;br&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;
folder = folder.SubFolders.Add(nextfolder.Name)&lt;br&gt;
&lt;font color="#0000ff"&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;
Else&lt;/font&gt;
&lt;br&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;
folder = nextfolder&lt;br&gt;
&lt;font color="#0000ff"&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;
End If&lt;br&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;
Next&lt;br&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;
End If&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Using&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Using&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/font&gt;
&lt;br&gt;
&lt;br&gt;
Okay, I know it doesn't look like much, but that code represents some hard won knowledge.
The main thing was dealing with folders that had spaces in them. Before, I was System.Web.HttpUtility.UrlDecode()ing
them, but my use of .Name on a .Exists=false proved to be much more elegant. Even
though I'm doing a GetFolder on a escaped url, the .Name property returns a nice,
suitable for passing into SubFolders.Add(), de%20ed name. But why use this ugly indirect
path string building technique? Well, I could not find an exception-free way of doing
existence testing of a folder other than web.GetFolder() which, of course, needs a
web relative url -- this lead to the more clunky looking GetFolder expression.&lt;br&gt;
&lt;blockquote&gt;&lt;font color="#0000ff"&gt;RaiseEvent &lt;/font&gt;OnReligiousArgument&lt;br&gt;
&lt;/blockquote&gt;For the two people that read this blog (me and uh, that might be an exagerated
figure) the reason my snippets have been in VB.NET lately is because I think VB.NET
is underloved in the SharePoint community. VSEWSS, for example, is a C# only club.
Heck with that. It doesn't provide enough juice to justify the opaqueness of its wsp
builder. VB.NET has some nice features and I like taking advantage of them -- I know
both cold and I make no apologies for choosing VB.NET. If you are one of those C#
1337ists... run the benchmarks and tell me its so much better. Tell me what it does
so much better that it makes up for the utter lack of exception filters, XML literals
(VB9), pleasant event raising, beyond 1980s-era switch/select case, optional parameters,
automatic by-reference parameters for callers, array resizing, and procedure scoped
static vars. I'm not saying C# is worse -- it's like the difference between ibuprofen
and acetaminophen. Minor advantages in some edge cases both ways but they all fix
most headaches.&lt;br&gt;
&lt;br&gt;
I've seen some comparisons between the two languages before on the net, but none seemed
entirely complete. If I ever am put in jail with nothing but a toilet and a laptop
for a few years, perhaps I'd blog /the/ definitive list.&lt;br&gt;
&lt;br&gt;
For those of you thinking of writing in your reasons why C# is soooo superior to VB.NET,
please refer to the &lt;a href="http://en.wikipedia.org/wiki/Logical_fallacy"&gt;Logical
Fallacy article on Wikipedia&lt;/a&gt; before embarrassing yourself. Reasons like "real
programmers use semicolons" or "only a moron would use a language with the word 'basic'
in the name" will be ridiculed mercilessly. There are some valid arguments for C#
and one could make an equally compelling valid case for it over VB.NET.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=a84dd6c8-7046-4934-9d09-40bd69bcad8d" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,a84dd6c8-7046-4934-9d09-40bd69bcad8d.aspx</comments>
      <category>.NET Internals</category>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=1ba5a954-b901-481e-8752-f1810f887b4d</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,1ba5a954-b901-481e-8752-f1810f887b4d.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,1ba5a954-b901-481e-8752-f1810f887b4d.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=1ba5a954-b901-481e-8752-f1810f887b4d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SharePoint advertises the fact that you can access files on a document library via
WebDAV. This is done via <a href="file://\\{server}\{site}\{doclibname}\">\\{server}\{site}\{doclibname}\</a> and
you can easily get to it with the list menu under "Actions", "Open with Windows Explorer". A
lesser known fact is that you can also use WebDAV to access the attachments collection
of a list with attachments enabled. This is done via <a href="file://\\{server}\{site}\Lists\{listname}\Attachments\{listitemid}\">\\{server}\{site}\Lists\{listname}\Attachments\{listitemid}\</a></p>
        <p>
You should be aware that the WebDAV folder for the list item will not exist until
a file has been added to the attachment collection. If you need it to always exist,
you can make an ItemAdded event handler that simply adds a file and deletes it, like
this:
</p>
        <p>
          <font color="#0000ff">Public Overrides Sub</font> ItemAdded(<font color="#0000ff">ByVal</font> properties <font color="#0000ff">As</font> Microsoft.SharePoint.SPItemEventProperties)<br />
   <font color="#0000ff">Const</font> tempFileName <font color="#0000ff">As</font><font color="#0000ff">String</font> = <font color="#a52a2a">"deleteme.txt"<br /></font>   <font color="#0000ff">If</font> item.Attachments.Count =
0 <font color="#0000ff">Then<br />
      Try<br />
         Me</font>.DisableEventFiring()<br />
         item.Attachments.AddNow(tempFileName,
System.Text.Encoding.ASCII.GetBytes(<font color="#a52a2a">"This is a temporary file.
If you find it, please delete it."</font>))<br />
         item.Attachments.DeleteNow(tempFileName)<br /><font color="#9acd32">        </font><font color="#006400"> '
Here we also save a WebDAV hyperlink<br /></font>         <font color="#0000ff">Dim</font> u <font color="#0000ff">As
New</font> Uri(item.Attachments.UrlPrefix)<br />
         item(<font color="#a52a2a">"AttachmentsLink"</font>)
= <font color="#0000ff">String</font>.Format(<font color="#a52a2a">"</font><a href="file://{0}{1"><font color="#a52a2a">file://{0}{1</font></a><font color="#a52a2a">},
Attachments"</font>, u.Host, u.AbsolutePath))<font color="#a52a2a"><br /></font>         item.Update()<br />
      <font color="#0000ff">Finally</font><br />
         Me.EnableEventFiring()<br />
      <font color="#0000ff">End Try<br />
   End If<br />
End Sub</font></p>
        <p>
          <font color="#000000">In the code above, I also set a hyperlink field so the user
has easy access to the WebDAV view of the list item. I simply added a hyperlink column
called "AttachmentsLink" to the list.</font>
        </p>
        <p>
          <font color="#000000">If you are having trouble using the WebDAV access, be sure
that your WebClient service is enabled and started, which is NOT the default on Windows
Server 2003.</font>
        </p>
        <p>
          <font color="#000000">There is a series of ItemAttachment events available and as
I mentioned before, the documentation for them is not very good. Hint: properties.AfterUrl
will indicate the added file. .BeforeUrl will indicate the file being deleted.</font>
        </p>
        <p>
          <font color="#000000">BUG: The thing to watch out for is that when using WebDAV, the
ItemAttachment events don't fire, but instead, an item event fires with .AfterUrl
or .BeforeUrl set, which it wouldn't ordinarily -- you can use this fact to choose
to reroute Item events to the appropriate ItemAttachment events in your event
code. It would be nice if you could poke in the proper properties.EventType, but it's
read-only so you need to make sure that any part of your ItemAttachment event code
can handle that.</font>
        </p>
        <font color="#000000">
          <p>
            <font color="#0000ff">Public Overrides Sub</font> Item{Whatever}(<font color="#0000ff">ByVal</font> properties <font color="#0000ff">As</font> Microsoft.SharePoint.SPItemEventProperties)<br /><font color="#006400">   ' Reroute for WebDAV event bug<br /></font>   <font color="#0000ff">If</font> properties.AfterUrl<font color="#0000ff"> IsNot
Nothing AndAlso <font color="#000000">properties.AfterUrl</font><font color="#000000">&lt;&gt;</font><font color="#a52a2a">""</font> Then <font color="#000000">ItemAttachmentAdding(properties)</font><font color="#006400"><font color="#0000ff">:
Exit Sub </font>'or ..Added( if -ed event.</font><br /></font>   <font color="#0000ff">If</font> properties.BeforeUrl <font color="#0000ff">IsNot
Nothing AndAlso <font color="#000000">properties.BeforeUrl</font><font color="#000000">&lt;&gt;</font><font color="#a52a2a">""</font> Then </font>ItemAttachmentDeleting(properties) : <font color="#0000ff">Exit
Sub</font><font color="#006400">'or ..Deleted( if -ed event</font><br /><font color="#0000ff"><font color="#006400"><br />
   ' Normal event code follows</font><br /></font><font color="#0000ff">End Sub</font></p>
        </font>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=1ba5a954-b901-481e-8752-f1810f887b4d" />
      </body>
      <title>SharePoint List Attachment Events and WebDAV bug / workaround</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,1ba5a954-b901-481e-8752-f1810f887b4d.aspx</guid>
      <link>http://freachable.net/2008/06/12/SharePointListAttachmentEventsAndWebDAVBugWorkaround.aspx</link>
      <pubDate>Thu, 12 Jun 2008 23:50:50 GMT</pubDate>
      <description>&lt;p&gt;
SharePoint advertises the fact that you can access files on a document library via
WebDAV. This is done via &lt;a href="file://\\{server}\{site}\{doclibname}\"&gt;\\{server}\{site}\{doclibname}\&lt;/a&gt;&amp;nbsp;and
you can easily get to it with the list menu under "Actions", "Open with Windows Explorer".&amp;nbsp;A
lesser known fact is that you can also use WebDAV to access the attachments collection
of a list with attachments enabled. This is done via &lt;a href="file://\\{server}\{site}\Lists\{listname}\Attachments\{listitemid}\"&gt;\\{server}\{site}\Lists\{listname}\Attachments\{listitemid}\&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You should be aware that the WebDAV folder for the list item will not exist until
a file has been added to the attachment collection. If you need it to always exist,
you can make an ItemAdded event handler that simply adds a file and deletes it, like
this:
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#0000ff&gt;Public Overrides Sub&lt;/font&gt; ItemAdded(&lt;font color=#0000ff&gt;ByVal&lt;/font&gt; properties &lt;font color=#0000ff&gt;As&lt;/font&gt; Microsoft.SharePoint.SPItemEventProperties)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;Const&lt;/font&gt; tempFileName &lt;font color=#0000ff&gt;As&lt;/font&gt; &lt;font color=#0000ff&gt;String&lt;/font&gt; = &lt;font color=#a52a2a&gt;"deleteme.txt"&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;If&lt;/font&gt; item.Attachments.Count = 0 &lt;font color=#0000ff&gt;Then&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Me&lt;/font&gt;.DisableEventFiring()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;item.Attachments.AddNow(tempFileName,
System.Text.Encoding.ASCII.GetBytes(&lt;font color=#a52a2a&gt;"This is a temporary file.
If you find it, please delete it."&lt;/font&gt;))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;item.Attachments.DeleteNow(tempFileName)&lt;br&gt;
&lt;font color=#9acd32&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color=#006400&gt;&amp;nbsp;'
Here&amp;nbsp;we also save a WebDAV hyperlink&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;Dim&lt;/font&gt; u &lt;font color=#0000ff&gt;As
New&lt;/font&gt; Uri(item.Attachments.UrlPrefix)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;item(&lt;font color=#a52a2a&gt;"AttachmentsLink"&lt;/font&gt;)
=&amp;nbsp;&lt;font color=#0000ff&gt;String&lt;/font&gt;.Format(&lt;font color=#a52a2a&gt;"&lt;/font&gt;&lt;a href="file://{0}{1"&gt;&lt;font color=#a52a2a&gt;file://{0}{1&lt;/font&gt;&lt;/a&gt;&lt;font color=#a52a2a&gt;},
Attachments"&lt;/font&gt;, u.Host, u.AbsolutePath))&lt;font color=#a52a2a&gt;
&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;item.Update()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;Finally&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Me.EnableEventFiring()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;End Try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;End If&lt;br&gt;
End Sub&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;In the code above, I also set a hyperlink field so the user has
easy access to the WebDAV view of the list item. I simply added a hyperlink column
called "AttachmentsLink" to the list.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;If you are having trouble&amp;nbsp;using the WebDAV access, be sure
that your WebClient service is enabled and started, which is NOT the default on Windows
Server 2003.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;There is a series of ItemAttachment events available and as I
mentioned before, the documentation for them is not very good. Hint: properties.AfterUrl
will indicate the added file. .BeforeUrl will indicate the file being deleted.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;BUG: The thing to watch out for is that when using WebDAV, the
ItemAttachment events don't fire, but instead, an item event fires with .AfterUrl
or .BeforeUrl set, which it wouldn't ordinarily -- you can use this fact to choose
to&amp;nbsp;reroute Item events to the appropriate ItemAttachment events in your event
code. It would be nice if you could poke in the proper properties.EventType, but it's
read-only so you need to make sure that any part of your ItemAttachment event code
can handle that.&lt;/font&gt;
&lt;/p&gt;
&lt;font color=#000000&gt; 
&lt;p&gt;
&lt;font color=#0000ff&gt;Public Overrides Sub&lt;/font&gt; Item{Whatever}(&lt;font color=#0000ff&gt;ByVal&lt;/font&gt; properties &lt;font color=#0000ff&gt;As&lt;/font&gt; Microsoft.SharePoint.SPItemEventProperties)&lt;br&gt;
&lt;font color=#006400&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;' Reroute for WebDAV event bug&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;If&lt;/font&gt;&amp;nbsp;properties.AfterUrl&lt;font color=#0000ff&gt;&amp;nbsp;IsNot
Nothing AndAlso &lt;font color=#000000&gt;properties.AfterUrl&lt;/font&gt; &lt;font color=#000000&gt;&amp;lt;&amp;gt;&lt;/font&gt; &lt;font color=#a52a2a&gt;""&lt;/font&gt; Then &lt;font color=#000000&gt;ItemAttachmentAdding(properties)&lt;/font&gt;&lt;font color=#006400&gt; &lt;font color=#0000ff&gt;:
Exit Sub &lt;/font&gt;'or&amp;nbsp;..Added( if&amp;nbsp;-ed event.&lt;/font&gt;
&lt;br&gt;
&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;If&lt;/font&gt; properties.BeforeUrl &lt;font color=#0000ff&gt;IsNot
Nothing AndAlso &lt;font color=#000000&gt;properties.BeforeUrl&lt;/font&gt; &lt;font color=#000000&gt;&amp;lt;&amp;gt;&lt;/font&gt; &lt;font color=#a52a2a&gt;""&lt;/font&gt; Then&amp;nbsp;&lt;/font&gt;ItemAttachmentDeleting(properties)&amp;nbsp;: &lt;font color=#0000ff&gt;Exit
Sub&lt;/font&gt; &lt;font color=#006400&gt;'or ..Deleted( if -ed event&lt;/font&gt;
&lt;br&gt;
&lt;font color=#0000ff&gt;&lt;font color=#006400&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;' Normal event code follows&lt;/font&gt;
&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff&gt;End Sub&lt;/font&gt;
&lt;/p&gt;
&lt;/font&gt;&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=1ba5a954-b901-481e-8752-f1810f887b4d" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,1ba5a954-b901-481e-8752-f1810f887b4d.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=25894673-572b-4cb0-94f2-7f5ead749719</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,25894673-572b-4cb0-94f2-7f5ead749719.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,25894673-572b-4cb0-94f2-7f5ead749719.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=25894673-572b-4cb0-94f2-7f5ead749719</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It's not at all clear from the documentation nor is it logically located in the object
model, but when you get a SharePoint attachment event (like ItemAttachmentAdding,
ItemAttachmentAdded, ItemAttachmentDeleting, ItemAttachmentDeleted) you get the properties.Attachment
collection, but the affected attachment is indicated by the properties.AfterUrl property
which gives a web.Url relative url to the attachment being evented on.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=25894673-572b-4cb0-94f2-7f5ead749719" />
      </body>
      <title>SharePoint List Attachment Events</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,25894673-572b-4cb0-94f2-7f5ead749719.aspx</guid>
      <link>http://freachable.net/2008/06/05/SharePointListAttachmentEvents.aspx</link>
      <pubDate>Thu, 05 Jun 2008 23:09:49 GMT</pubDate>
      <description>&lt;p&gt;
It's not at all clear from the documentation nor is it logically located in the object
model, but when you get a SharePoint attachment event (like ItemAttachmentAdding,
ItemAttachmentAdded, ItemAttachmentDeleting, ItemAttachmentDeleted) you get the properties.Attachment
collection, but the affected attachment is indicated by the properties.AfterUrl property
which gives a web.Url relative url to the attachment being evented on.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=25894673-572b-4cb0-94f2-7f5ead749719" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,25894673-572b-4cb0-94f2-7f5ead749719.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=d30c6223-4cbb-45a8-a0d2-f71109e4b9f5</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,d30c6223-4cbb-45a8-a0d2-f71109e4b9f5.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,d30c6223-4cbb-45a8-a0d2-f71109e4b9f5.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=d30c6223-4cbb-45a8-a0d2-f71109e4b9f5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Not actually supported. You really need to <strong>-o backup</strong> your SC before
you do it. If you didn't, try at least to backup your 12.0/Secure key in regedit and
copy the \Windows\SysMSI\*\*.cer. The content is PKI protected. I've dorked up a WSS3
install royally this way.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=d30c6223-4cbb-45a8-a0d2-f71109e4b9f5" />
      </body>
      <title>Uninstalling Search Server Express 2008 on WSS3</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,d30c6223-4cbb-45a8-a0d2-f71109e4b9f5.aspx</guid>
      <link>http://freachable.net/2008/05/16/UninstallingSearchServerExpress2008OnWSS3.aspx</link>
      <pubDate>Fri, 16 May 2008 07:11:30 GMT</pubDate>
      <description>&lt;p&gt;
Not actually supported. You really need to &lt;strong&gt;-o backup&lt;/strong&gt; your SC before
you do it. If you didn't, try at least to backup your 12.0/Secure key in regedit and
copy the \Windows\SysMSI\*\*.cer. The content is PKI protected. I've dorked up a WSS3
install royally this way.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=d30c6223-4cbb-45a8-a0d2-f71109e4b9f5" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,d30c6223-4cbb-45a8-a0d2-f71109e4b9f5.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=bd93b7b6-748b-4df2-b2ec-6b133bfd82a4</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,bd93b7b6-748b-4df2-b2ec-6b133bfd82a4.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,bd93b7b6-748b-4df2-b2ec-6b133bfd82a4.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=bd93b7b6-748b-4df2-b2ec-6b133bfd82a4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just noticed that you can use a regular SharePoint calculated field to create a
calculated Url or email address. If the result of your calculated field contains
text that looks like a url or an email address, SharePoint will render it as such,
&lt;a&gt; wrapping it. This is the same behavior as regular text fields. Nifty.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=bd93b7b6-748b-4df2-b2ec-6b133bfd82a4" />
      </body>
      <title>SharePoint Calculated Fields</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,bd93b7b6-748b-4df2-b2ec-6b133bfd82a4.aspx</guid>
      <link>http://freachable.net/2008/05/02/SharePointCalculatedFields.aspx</link>
      <pubDate>Fri, 02 May 2008 18:28:38 GMT</pubDate>
      <description>&lt;p&gt;
I just noticed that you can use a regular SharePoint calculated field to create a
calculated Url or email address.&amp;nbsp;If the result of your calculated field contains
text that looks like a url or an email address, SharePoint will render it as such,
&amp;lt;a&amp;gt; wrapping it. This is the same behavior as regular text fields. Nifty.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=bd93b7b6-748b-4df2-b2ec-6b133bfd82a4" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,bd93b7b6-748b-4df2-b2ec-6b133bfd82a4.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=6796bb75-7466-4931-ad42-3ca465501e62</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,6796bb75-7466-4931-ad42-3ca465501e62.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,6796bb75-7466-4931-ad42-3ca465501e62.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6796bb75-7466-4931-ad42-3ca465501e62</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When running the install for VSeWSSv11.exe, do you get:
</p>
        <address>&lt;lame&gt;
</address>
        <address>"This product can only be installed if Windows SharePoint Services 3.0 has
been installed first."
</address>
        <address>&lt;/lame&gt;<br /></address>
        <p>
Seriously? So this means I can use Windows XP or Vista to develop WSS stuff?
Boo. The download page does say it requires Windows Server 2003 or 2008. Boo, I say.
</p>
        <p>
Merge this .reg
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <pre>Windows Registry Editor Version 5.00</pre>
          <pre>[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0]<br />
"SharePoint"="Installed"</pre>
        </blockquote>
        <p>
and try again. Yay! Of course to really work on SharePoint stuff you'll also need
various dlls like Microsoft.SharePoint.dll.
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <pre>gacutil -i Microsoft.SharePoint.dll<br />
gacutil -i Microsoft.SharePoint.Security.dll</pre>
        </blockquote>
        <p>
Ah... much better. But it is still pretty weak. I prefer to use plain projects and
use a custom build action to cab it up.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=6796bb75-7466-4931-ad42-3ca465501e62" />
      </body>
      <title>VSeWSS install </title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,6796bb75-7466-4931-ad42-3ca465501e62.aspx</guid>
      <link>http://freachable.net/2008/04/24/VSeWSSInstall.aspx</link>
      <pubDate>Thu, 24 Apr 2008 20:37:01 GMT</pubDate>
      <description>&lt;p&gt;
When running the install for VSeWSSv11.exe, do you get:
&lt;/p&gt;
&lt;address&gt;&amp;lt;lame&amp;gt;
&lt;/address&gt;
&lt;address&gt;"This product can only be installed if Windows SharePoint Services 3.0 has
been installed first."
&lt;/address&gt;
&lt;address&gt;&amp;lt;/lame&amp;gt;&lt;br&gt;
&lt;/address&gt;
&lt;p&gt;
Seriously? So this means I can use Windows XP or Vista&amp;nbsp;to develop WSS stuff?
Boo. The download page does say it requires Windows Server 2003 or 2008. Boo, I say.
&lt;/p&gt;
&lt;p&gt;
Merge this .reg
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;pre&gt;Windows Registry Editor Version 5.00&lt;/pre&gt;&lt;pre&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0]&lt;br&gt;
"SharePoint"="Installed"&lt;/pre&gt;&lt;/blockquote&gt; 
&lt;p&gt;
and try again. Yay! Of course to really work on SharePoint stuff you'll also need
various dlls like Microsoft.SharePoint.dll.
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;pre&gt;gacutil -i Microsoft.SharePoint.dll&lt;br&gt;
gacutil -i Microsoft.SharePoint.Security.dll&lt;/pre&gt;&lt;/blockquote&gt; 
&lt;p&gt;
Ah... much better. But it is still pretty weak. I prefer to use plain projects and
use a custom build action to cab it up.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=6796bb75-7466-4931-ad42-3ca465501e62" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,6796bb75-7466-4931-ad42-3ca465501e62.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=8eb2ac1e-a4f0-4f01-90af-5350af060a0f</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,8eb2ac1e-a4f0-4f01-90af-5350af060a0f.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,8eb2ac1e-a4f0-4f01-90af-5350af060a0f.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8eb2ac1e-a4f0-4f01-90af-5350af060a0f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In SharePoint, you can create custom properties for User Profiles. Additionally, you
can have search index those, but be aware that a search crawl must occur after you
add the user profile property for search to even be aware of it. This explains why
after adding a custom property in User Profiles, you cannot see it in search's metadata
property mapping.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=8eb2ac1e-a4f0-4f01-90af-5350af060a0f" />
      </body>
      <title>Custom Metadata Properties from User Profiles in Search</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,8eb2ac1e-a4f0-4f01-90af-5350af060a0f.aspx</guid>
      <link>http://freachable.net/2008/01/23/CustomMetadataPropertiesFromUserProfilesInSearch.aspx</link>
      <pubDate>Wed, 23 Jan 2008 22:07:40 GMT</pubDate>
      <description>&lt;p&gt;
In SharePoint, you can create custom properties for User Profiles. Additionally, you
can have search index those, but be aware that a search crawl must occur after you
add the user profile property for search to even be aware of it. This explains why
after adding a custom property in User Profiles, you cannot see it in search's metadata
property mapping.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=8eb2ac1e-a4f0-4f01-90af-5350af060a0f" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,8eb2ac1e-a4f0-4f01-90af-5350af060a0f.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=700ecc71-9625-4e9f-9d0c-e5df63034982</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,700ecc71-9625-4e9f-9d0c-e5df63034982.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,700ecc71-9625-4e9f-9d0c-e5df63034982.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=700ecc71-9625-4e9f-9d0c-e5df63034982</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I wanted to pass along some key new things
to check out from Microsoft: 
<ul><li>
The big one is Visual Studio 2008. It has been released including Express Editions.
You definitely want to check this out at <a href="http://msdn.com/express">msdn.com/express</a>. 
</li><li>
Also, for you math heads out there, check out the new Word 2007 add-in, "Microsoft
Math". Get it at <a href="http://http://www.microsoft.com/downloads/results.aspx?pocId=&amp;freetext=officemath&amp;DisplayLang=en">download.microsoft.com</a> -
search for officemath. 
</li><li>
For all you who have lamented about having to fill the same forms over and over at
the doctor's office, check out HealthVault (<a href="http://healthvault.com">healthvault.com</a>).
It is a platform for holding personal information (like the usual stuff you fill out
on those forms) and holding ongoing data (like blood glucose levels synced from compatible
monitors). You can choose what data to share with whom, for example, you can share
your heart rate data to your exercise group or family to show your progress. 
</li><li>
For the bean counters, there's Office Accounting 2008, including an Express edition.
This new version includes online banking service integration. If you're running or
thinking about Intuit's Quikbooks, check this out at <a href="http://office.microsoft.com/accounting">office.microsoft.com/accounting</a>. 
</li><li>
Search Server 2008 now includes an Express edition. This gives you web search of your
web and disk content. The release candidate is available at <a href="http://microsoft.com/enterprisesearch">microsoft.com/enterprisesearch</a></li><li>
SQL Server 2008 November CTP - <a href="http://microsoft.com/sql">microsoft.com/sql</a></li></ul><p>
I normally scoff at blogs that are nothing but repeaters for Microsoft's marketing
department, so I've tried to keep the descriptions unhyped. Additionally, these are
all things I will be working with in the near future, so expect to see more information
related to these soon.
</p><img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=700ecc71-9625-4e9f-9d0c-e5df63034982" /></body>
      <title>New goodies from Microsoft</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,700ecc71-9625-4e9f-9d0c-e5df63034982.aspx</guid>
      <link>http://freachable.net/2007/11/20/NewGoodiesFromMicrosoft.aspx</link>
      <pubDate>Tue, 20 Nov 2007 19:16:01 GMT</pubDate>
      <description>I wanted to pass along some key new things to check out from Microsoft: 
&lt;ul&gt;
&lt;li&gt;
The big one is Visual Studio 2008. It has been released including Express Editions.
You definitely want to check this out at &lt;a href="http://msdn.com/express"&gt;msdn.com/express&lt;/a&gt;. 
&lt;li&gt;
Also, for you math heads out there, check out the new Word 2007 add-in, "Microsoft
Math". Get it at &lt;a href="http://http://www.microsoft.com/downloads/results.aspx?pocId=&amp;amp;freetext=officemath&amp;amp;DisplayLang=en"&gt;download.microsoft.com&lt;/a&gt; -
search for officemath. 
&lt;li&gt;
For all you who have lamented about having to fill the same forms over and over at
the doctor's office, check out HealthVault (&lt;a href="http://healthvault.com"&gt;healthvault.com&lt;/a&gt;).
It is a platform for holding personal information (like the usual stuff you fill out
on those forms) and holding ongoing data (like blood glucose levels synced from compatible
monitors). You can choose what data to share with whom, for example, you can share
your heart rate data to your exercise group or family to show your progress. 
&lt;li&gt;
For the bean counters, there's Office Accounting 2008, including an Express edition.
This new version includes online banking service integration. If you're running or
thinking about Intuit's Quikbooks, check this out at &lt;a href="http://office.microsoft.com/accounting"&gt;office.microsoft.com/accounting&lt;/a&gt;. 
&lt;li&gt;
Search Server 2008 now includes an Express edition. This gives you web search of your
web and disk content. The release candidate is available at &lt;a href="http://microsoft.com/enterprisesearch"&gt;microsoft.com/enterprisesearch&lt;/a&gt; 
&lt;li&gt;
SQL Server 2008 November CTP - &lt;a href="http://microsoft.com/sql"&gt;microsoft.com/sql&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I normally scoff at blogs that are nothing but repeaters for Microsoft's marketing
department, so I've tried to keep the descriptions unhyped. Additionally, these are
all things I will be working with in the near future, so expect to see more information
related to these soon.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=700ecc71-9625-4e9f-9d0c-e5df63034982" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,700ecc71-9625-4e9f-9d0c-e5df63034982.aspx</comments>
      <category>Office 12</category>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=16e3e742-f56e-40ed-9b7f-291fe374da94</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,16e3e742-f56e-40ed-9b7f-291fe374da94.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,16e3e742-f56e-40ed-9b7f-291fe374da94.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=16e3e742-f56e-40ed-9b7f-291fe374da94</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Scenario: You just made a nice DVWP and you exported it and mounted it on another
page and kaboom -- FAIL.
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>Unable to display this Web Part. To troubleshoot the problem, open this Web page
in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint
Designer. If the problem persists, contact your Web server administrator.</em>
          </p>
        </blockquote>
        <p dir="ltr">
Whoops. Different site. Even though the DVWP references the list by GUID, it doesn't
work cross-site. Here's how to fix that.
</p>
        <p>
Leave the broken DVWP where it is. Add another DVWP on the same page, in the Data
Source Library, click "Connect to another library..." and point it at the site where
the data came from. You should now be able to expand the lists/libraries and insert
that. Now, just grab the stuff inside &lt;SharePointWebControls:SPDataSource&gt; and
copy that over the broken one's data source. Throw away the temporary web part and
you should be good to go.<br /></p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=16e3e742-f56e-40ed-9b7f-291fe374da94" />
      </body>
      <title>Mounting a data view web part in a different site</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,16e3e742-f56e-40ed-9b7f-291fe374da94.aspx</guid>
      <link>http://freachable.net/2007/11/03/MountingADataViewWebPartInADifferentSite.aspx</link>
      <pubDate>Sat, 03 Nov 2007 06:03:22 GMT</pubDate>
      <description>&lt;p&gt;
Scenario: You just made a nice DVWP and you exported it and mounted it on another
page and kaboom -- FAIL.
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;em&gt;Unable to display this Web Part. To troubleshoot the problem, open this Web page
in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint
Designer. If the problem persists, contact your Web server administrator.&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p dir=ltr&gt;
Whoops. Different site. Even though the DVWP references the list by GUID, it doesn't
work cross-site. Here's how to fix that.
&lt;/p&gt;
&lt;p&gt;
Leave the broken DVWP where it is. Add another DVWP on the same page, in the Data
Source Library, click "Connect to another library..." and point it at the site where
the data came from. You should now be able to expand the lists/libraries and insert
that. Now, just grab the stuff inside &amp;lt;SharePointWebControls:SPDataSource&amp;gt; and
copy that over the broken one's data source. Throw away the temporary web part and
you should be good to go.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=16e3e742-f56e-40ed-9b7f-291fe374da94" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,16e3e742-f56e-40ed-9b7f-291fe374da94.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=7b0611b9-0f02-4a40-b655-20d524cf88f1</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,7b0611b9-0f02-4a40-b655-20d524cf88f1.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,7b0611b9-0f02-4a40-b655-20d524cf88f1.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7b0611b9-0f02-4a40-b655-20d524cf88f1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I thought I saw Heather Solomon blog about how to do this, but I couldn't find it
to reference here. Anyway, I wasn't really excited about the way she described, so
I tried something else.
</p>
        <p>
The problem is that SPD doesn't want you to customize a publishing page. You can detach
it from the page layout, but that's kinda lame.
</p>
        <p>
Try this instead:
</p>
        <ol>
          <li>
Make a copy of the page where you want a custom DVWP added. 
</li>
          <li>
Detach the copy from the page layout 
</li>
          <li>
Edit that page in SPD. 
</li>
          <li>
Add and customize a DVWP. 
</li>
          <li>
You might have to add DVWP to the webpart gallery - go to root admin, web parts, add. 
</li>
          <li>
Now, export that DVWP which you can do from the browser. 
</li>
          <li>
Upload it to the webpart gallery 
</li>
          <li>
Mount it on the page you started with; the one that is still attached to the page
layout.</li>
        </ol>
        <p>
Edit: You can short cut that a bit - after export, just go to the advanced toolpane,
and import from there.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=7b0611b9-0f02-4a40-b655-20d524cf88f1" />
      </body>
      <title>Making a custom data view web part using SPD on a publishing page</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,7b0611b9-0f02-4a40-b655-20d524cf88f1.aspx</guid>
      <link>http://freachable.net/2007/11/02/MakingACustomDataViewWebPartUsingSPDOnAPublishingPage.aspx</link>
      <pubDate>Fri, 02 Nov 2007 23:39:05 GMT</pubDate>
      <description>&lt;p&gt;
I thought I saw Heather Solomon blog about how to do this, but I couldn't find it
to reference here. Anyway, I wasn't really excited about the way she described, so
I tried something else.
&lt;/p&gt;
&lt;p&gt;
The problem is that SPD doesn't want you to customize a publishing page. You can detach
it from the page layout, but that's kinda lame.
&lt;/p&gt;
&lt;p&gt;
Try this instead:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Make a copy of the page where you want a custom DVWP added. 
&lt;li&gt;
Detach the copy from the page layout 
&lt;li&gt;
Edit that page in SPD. 
&lt;li&gt;
Add and customize a DVWP. 
&lt;li&gt;
You might have to add DVWP to the webpart gallery - go to root admin, web parts, add. 
&lt;li&gt;
Now, export that DVWP which you can do from the browser. 
&lt;li&gt;
Upload it to the webpart gallery 
&lt;li&gt;
Mount it on the page you started with; the one that is still attached to the page
layout.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Edit: You can short cut that a bit - after export, just go to the advanced toolpane,
and import from there.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=7b0611b9-0f02-4a40-b655-20d524cf88f1" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,7b0611b9-0f02-4a40-b655-20d524cf88f1.aspx</comments>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://freachable.net/Trackback.aspx?guid=b4e37a02-d21d-46b9-ab7f-6e6d16232dc2</trackback:ping>
      <pingback:server>http://freachable.net/pingback.aspx</pingback:server>
      <pingback:target>http://freachable.net/PermaLink,guid,b4e37a02-d21d-46b9-ab7f-6e6d16232dc2.aspx</pingback:target>
      <dc:creator>Hafthor Stefansson</dc:creator>
      <wfw:comment>http://freachable.net/CommentView,guid,b4e37a02-d21d-46b9-ab7f-6e6d16232dc2.aspx</wfw:comment>
      <wfw:commentRss>http://freachable.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b4e37a02-d21d-46b9-ab7f-6e6d16232dc2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yes, yes, I hear you anti-table zealots, but this is cool. (I'll have to blog my thoughts
about this someday, along with the other religious argument about nothing but stored
procedures accessible to code.)
</p>
        <p>
Scenario: You have a table that will have <em>n</em> columns, where <em>n</em> is
determined at run time and you want the columns to have equal width, for example,
a table that is 100px wide with 4 columns should render 25px wide columns, 5 wide,
20px.
</p>
        <p>
Why is this useful? SharePoint or ASP.NET SitePath menus.
</p>
        <p>
Here's how:
</p>
        <p>
table tr td { width:5%; }
</p>
        <p>
When the table renders and sums up the 5%s and gets only 20 or 25% total, it scales
that up to be 100% and the cell width percentage scales up with it.
</p>
        <p>
see it at <a href="http://hafthor.com/equalwidthtables.html">http://hafthor.com/equalwidthtables.html</a></p>
        <p>
I haven't tested this non-quirks mode, but it does work in FireFox and IE7.
</p>
        <p>
[Edit 2007-11-04] I have tested this in xhtml strict mode (IE7 and FireFox) - it still
works.
</p>
        <p>
see it at <a href="http://hafthor.com/tricks.html">http://hafthor.com/tricks.html</a></p>
        <p>
[Edit 2007-11-05] Dang. FireFox doesn't render this the way I wanted when in xhtml
strict mode. The issue wasn't apparent until the overall width wasn't really wide.
But, I tried those pages on iPhone Safari and they looked okay.
</p>
        <img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=b4e37a02-d21d-46b9-ab7f-6e6d16232dc2" />
      </body>
      <title>Automatic Equal Width Columns in HTML Tables</title>
      <guid isPermaLink="false">http://freachable.net/PermaLink,guid,b4e37a02-d21d-46b9-ab7f-6e6d16232dc2.aspx</guid>
      <link>http://freachable.net/2007/11/02/AutomaticEqualWidthColumnsInHTMLTables.aspx</link>
      <pubDate>Fri, 02 Nov 2007 21:30:28 GMT</pubDate>
      <description>&lt;p&gt;
Yes, yes, I hear you anti-table zealots, but this is cool. (I'll have to blog my thoughts
about this someday, along with the other religious argument about nothing but stored
procedures accessible to code.)
&lt;/p&gt;
&lt;p&gt;
Scenario: You have a table that will have &lt;em&gt;n&lt;/em&gt; columns, where &lt;em&gt;n&lt;/em&gt; is
determined at run time and you want the columns to have equal width, for example,
a table that is 100px wide with 4 columns should render 25px wide columns, 5 wide,
20px.
&lt;/p&gt;
&lt;p&gt;
Why is this useful? SharePoint or ASP.NET SitePath menus.
&lt;/p&gt;
&lt;p&gt;
Here's how:
&lt;/p&gt;
&lt;p&gt;
table tr td { width:5%; }
&lt;/p&gt;
&lt;p&gt;
When the table renders and sums up the 5%s and gets only 20 or 25% total, it scales
that up to be 100% and the cell width percentage scales up with it.
&lt;/p&gt;
&lt;p&gt;
see it at &lt;a href="http://hafthor.com/equalwidthtables.html"&gt;http://hafthor.com/equalwidthtables.html&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I haven't tested this non-quirks mode, but it does work in FireFox and IE7.
&lt;/p&gt;
&lt;p&gt;
[Edit 2007-11-04] I have tested this in xhtml strict mode (IE7 and FireFox) - it still
works.
&lt;/p&gt;
&lt;p&gt;
see it at &lt;a href="http://hafthor.com/tricks.html"&gt;http://hafthor.com/tricks.html&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
[Edit 2007-11-05] Dang. FireFox doesn't render this the way I wanted when in xhtml
strict mode. The issue wasn't apparent until the overall width wasn't really wide.
But, I tried those pages on iPhone Safari and they looked okay.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://freachable.net/aggbug.ashx?id=b4e37a02-d21d-46b9-ab7f-6e6d16232dc2" /&gt;</description>
      <comments>http://freachable.net/CommentView,guid,b4e37a02-d21d-46b9-ab7f-6e6d16232dc2.aspx</comments>
      <category>HTML</category>
      <category>SharePoint</category>
    </item>
  </channel>
</rss>