<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>benjamin.ramey</title>
	<atom:link href="http://blog.benramey.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.benramey.com</link>
	<description>Things I and my friends have learned while solving problems.</description>
	<lastBuildDate>Tue, 29 Jun 2010 22:25:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Vertical text with CSS</title>
		<link>http://blog.benramey.com/2010/06/29/vertical-text-with-css/</link>
		<comments>http://blog.benramey.com/2010/06/29/vertical-text-with-css/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 22:25:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[vertical]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/?p=156</guid>
		<description><![CDATA[I found a nice blog post today describing how to do vertical text with CSS.  Instead of reposting his information, I&#8217;ll just give the link. http://scottgale.com/blog/css-vertical-text/2010/03/01/ It&#8217;s a nice technique using various proprietary methods since there is no standard way to get vertical text across the major browsers right now.]]></description>
			<content:encoded><![CDATA[<p>I found a nice blog post today describing how to do vertical text with CSS.  Instead of reposting his information, I&#8217;ll just give the link.</p>
<p><a href="http://scottgale.com/blog/css-vertical-text/2010/03/01/">http://scottgale.com/blog/css-vertical-text/2010/03/01/</a></p>
<p>It&#8217;s a nice technique using various proprietary methods since there is no standard way to get vertical text across the major browsers right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2010/06/29/vertical-text-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio Post Build Event to Copy DLLs</title>
		<link>http://blog.benramey.com/2010/06/29/visual-studio-post-build-event-to-copy-dlls/</link>
		<comments>http://blog.benramey.com/2010/06/29/visual-studio-post-build-event-to-copy-dlls/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 18:59:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[build event]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/?p=152</guid>
		<description><![CDATA[While doing SharePoint development, we use a lot of pre- and post-build events in Visual Studio projects to do various things like build and deploy SharePoint solutions to our development environments, activate features automatically and other similar things to make the process of building solutions for SharePoint as automated as possible. One helpful way I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>While doing SharePoint development, we use a lot of pre- and post-build events in Visual Studio projects to do various things like build and deploy SharePoint solutions to our development environments, activate features automatically and other similar things to make the process of building solutions for SharePoint as automated as possible.</p>
<p>One helpful way I&#8217;ve been able to use post-build events is to copy the compiled DLLs for a given project to the inetpub directory for the SharePoint site I am currently working on.  As I&#8217;m building a new feature or debugging an existing one, I like to build a lot of see my changes as I go.  Well, building and deploying the entire SharePoint solution is a rather lengthy process it&#8217;s only really necessary if you&#8217;re changing ASPX pages or updating a feature XML file or something like that.  If all I did was come C# code changes, that&#8217;s too much to wait through to see my changes.  So, what I do is put a small post-build event in my projects that I&#8217;m working with that copies the DLLs for that project to my SharePoint site&#8217;s inetpub directory and I skip the whole SharePoint solution build and deployment step.</p>
<p>Adding a post-build event couldn&#8217;t be much simpler either.  In Visual Studio just right-click on the project you want to add the post-build event for in Solution Explorer and select &#8220;Properties&#8221;.  You can either do that or, with the project selected in Solution Explorer, hit Alt-Enter.  The project properties window will display.  On the left-hand side, click the &#8220;Build Events&#8221; tab.  You&#8217;ll see two boxes there.  One is for pre-build events and one is for post-build events.</p>
<p>In the post-build events textbox add the following:</p>
<blockquote><p>IF NOT ($(ConfigurationName)) == (Debug) GOTO END<br />
cd $(ProjectDir)<br />
copy /y bin\debug\* C:\inetpub\wwwroot\wss\VirtualDirectories\{YOUR SHAREPOINT SITE DIRECTORY}\bin<br />
:END</p></blockquote>
<p>These are just basic Windows batch commands like you&#8217;d find in any Windows batch file.  This is a very basic setup, but it should be a good starting point for you to work from.  All it does is check whether you are building with your Debug build configuration, if you are, then it moves to your project directory and copies the DLLs in your bin\debug folder to the bin folder of your SharePoint site.</p>
<p>Easy enough!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2010/06/29/visual-studio-post-build-event-to-copy-dlls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Flash Player 10.0.42 and swfobject 2.2</title>
		<link>http://blog.benramey.com/2010/06/25/adobe-flash-player-10-0-42-and-swfobject-2-2/</link>
		<comments>http://blog.benramey.com/2010/06/25/adobe-flash-player-10-0-42-and-swfobject-2-2/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 23:02:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[flashplayer 10.0.42]]></category>
		<category><![CDATA[flashplayer version]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[swfobject]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/?p=145</guid>
		<description><![CDATA[I ran across a strange problem today using FlashPlayer 10.0.42 along with swfobject 2.2.  The problem showed up in the form of the flash object simply not being displayed on the page when using swfobject to embed it.  Upgrading to 10.1 fixed the problem and as I tested on other machines, I found that even [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across a strange problem today using FlashPlayer 10.0.42 along with swfobject 2.2.  The problem showed up in the form of the flash object simply not being displayed on the page when using swfobject to embed it.  Upgrading to 10.1 fixed the problem and as I tested on other machines, I found that even a slight version difference in FlashPlayer worked fine as well.  For example, machines with FlashPlayer version 10.0.45 did not exhibit this problem.  The problem also did not appear in FireFox&#8211;only Internet Explorer.</p>
<p>I finally tracked the problem down to line 61 of the swfobject code where it is trying to determine the FlashPlayer version.  On line 61 you have:</p>
<blockquote><p>var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);</p></blockquote>
<p>This line is wrapped in try-catch block and an exception is thrown &#8220;Automation server can&#8217;t create object&#8221;.  I believe this normally has to do with security settings that don&#8217;t allow the browser to create local files.  However, since other versions of FlashPlayer seem to work just fine, I think this has more to do with a bug in this particular release of FlashPlayer.</p>
<p>The problem with swfobject is that when it catches this exception it leaves the version information blank for the FlashPlayer which then causes swfobject to be unable embed the flash player later down the line.  As a sort-of hack, in the catch block for this try-catch block I set the version information to 10.0.42:</p>
<blockquote><p>playerVersion = [10,0,42];</p></blockquote>
<p>This allows the swfobject code to continue and display the flash video.</p>
<p>I haven&#8217;t delved deeper into finding the actual cause of the problem.  I am assuming it is some bug with FlashPlayer 10.0.42 with how it interacts with the security settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2010/06/25/adobe-flash-player-10-0-42-and-swfobject-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search T-SQL views for text</title>
		<link>http://blog.benramey.com/2010/05/18/search-t-sql-views-for-text/</link>
		<comments>http://blog.benramey.com/2010/05/18/search-t-sql-views-for-text/#comments</comments>
		<pubDate>Tue, 18 May 2010 14:48:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[information_schema]]></category>
		<category><![CDATA[stored procedure]]></category>
		<category><![CDATA[t-sql]]></category>
		<category><![CDATA[view]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/?p=143</guid>
		<description><![CDATA[I needed to check which views in a certain database contained a particular string today.  This is a pretty easy problem to solve.  Just use a query like this: SELECT    TABLE_NAME, VIEW_DEFINITION FROM       INFORMATION_SCHEMA.VIEWS WHERE    VIEW_DEFINITION LIKE &#8216;%&#60;text_to_search_for&#62;%&#8217; This should find any views in the currently selected database that have the text you&#8217;re searching for in the [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to check which views in a certain database contained a particular string today.  This is a pretty easy problem to solve.  Just use a query like this:</p>
<blockquote><p>SELECT    TABLE_NAME, VIEW_DEFINITION<br />
FROM       INFORMATION_SCHEMA.VIEWS<br />
WHERE    VIEW_DEFINITION LIKE &#8216;%&lt;text_to_search_for&gt;%&#8217;</p></blockquote>
<p>This should find any views in the currently selected database that have the text you&#8217;re searching for in the view definition.  You can do the same for stored procedures and functions by just searching the INFORMATION_SCHEMA.ROUTINES table and the ROUTINE_DEFINITION column instead of the VIEW_DEFINITION column.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2010/05/18/search-t-sql-views-for-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error code 158 while removing Sharepoint MasterPage</title>
		<link>http://blog.benramey.com/2010/03/22/error-code-158-while-removing-sharepoint-masterpage/</link>
		<comments>http://blog.benramey.com/2010/03/22/error-code-158-while-removing-sharepoint-masterpage/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 18:18:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[error code 158]]></category>
		<category><![CDATA[featurereceiver]]></category>
		<category><![CDATA[masterpage]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/?p=140</guid>
		<description><![CDATA[I got an error code 158 today in a FeatureReceiver I had written while trying to delete a MasterPage in the FeatureDeactivated method.  I found this helpful blog post explaining the exact problem: http://blogs.msdn.com/ekraus/archive/2008/08/05/cannot-remove-file-error-code-158.aspx In short, the error code means the MasterPage is still in use on the site and so you can&#8217;t delete it.  [...]]]></description>
			<content:encoded><![CDATA[<p>I got an error code 158 today in a FeatureReceiver I had written while trying to delete a MasterPage in the FeatureDeactivated method.  I found this helpful blog post explaining the exact problem:</p>
<p><a href="http://blogs.msdn.com/ekraus/archive/2008/08/05/cannot-remove-file-error-code-158.aspx" target="_self">http://blogs.msdn.com/ekraus/archive/2008/08/05/cannot-remove-file-error-code-158.aspx</a></p>
<p>In short, the error code means the MasterPage is still in use on the site and so you can&#8217;t delete it.  Change the MasterPage being used on the site to another, and you will be able to delete the MasterPage file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2010/03/22/error-code-158-while-removing-sharepoint-masterpage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access Denied Microsoft.SharePoint.Administration.SPPersistedObject.Update()</title>
		<link>http://blog.benramey.com/2010/03/19/access-denied-microsoft-sharepoint-administration-sppersistedobject-update/</link>
		<comments>http://blog.benramey.com/2010/03/19/access-denied-microsoft-sharepoint-administration-sppersistedobject-update/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 16:24:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[access denied]]></category>
		<category><![CDATA[farm administrator group]]></category>
		<category><![CDATA[sppersistedobject]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/?p=138</guid>
		<description><![CDATA[I was struggling to find the source of this error today while working on a SharePoint site.  We have a custom page that saves WCF configuration settings for a certain service.  It uses an SPPersistedObject to store the WCF configuration form information to populate the form when you visit it later. This method worked fine [...]]]></description>
			<content:encoded><![CDATA[<p>I was struggling to find the source of this error today while working on a SharePoint site.  We have a custom page that saves WCF configuration settings for a certain service.  It uses an SPPersistedObject to store the WCF configuration form information to populate the form when you visit it later.</p>
<p>This method worked fine on my development machine, but as soon as I staged it into our staging environment it did not work.  It took me a while to find the source of the problem, but as the error suggests, I eventually tracked it down to a permissions problem.  More specifically, in the SharePoint log files (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS) I found an entry that gave the exact problem which read: &#8220;The SPPersistedObject, SPWebApplication Name=XXX=SPWebService, could not be updated because the current user is not a Farm Administrator. &#8221;</p>
<p>Adding my user account to the Farm Administrator Group (Central Admin &gt; Operations &gt; Security Configuration &gt; Update farm administrator&#8217;s group) on the stage box along with resetting IIS (iisreset on the command line) fixed the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2010/03/19/access-denied-microsoft-sharepoint-administration-sppersistedobject-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A lesson in adding Sharepoint navigation nodes</title>
		<link>http://blog.benramey.com/2010/02/16/a-lesson-in-adding-sharepoint-navigation-nodes/</link>
		<comments>http://blog.benramey.com/2010/02/16/a-lesson-in-adding-sharepoint-navigation-nodes/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 19:32:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[sharepoint2007]]></category>
		<category><![CDATA[spnavigation]]></category>
		<category><![CDATA[spnavigationnode]]></category>
		<category><![CDATA[spnavigationnodecollection]]></category>
		<category><![CDATA[topnavigationbar]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/2010/02/16/a-lesson-in-adding-sharepoint-navigation-nodes/</guid>
		<description><![CDATA[I learned something today while trying to add Top Navigation Bar navigation nodes in a SharePoint feature receiver. If you&#8217;re adding a node and also wanting to add child nodes of that node at the same time, make sure to actually add the parent node to the TopNavigationBar before trying to add the child nodes [...]]]></description>
			<content:encoded><![CDATA[<p>I learned something today while trying to add Top Navigation Bar navigation nodes in a SharePoint feature receiver.  If you&#8217;re adding a node and also wanting to add child nodes of that node at the same time, make sure to actually add the parent node to the TopNavigationBar before trying to add the child nodes to the parent node.</p>
<p>In other words, this won&#8217;t work:</p>
<blockquote><p>SPNavigationNode portalNode = new SPNavigationNode(&#8220;My Portal&#8221;, &#8220;/portal/Default.aspx&#8221;, false);</p>
<p>portalNode.Children.AddAsFirst(new SPNavigationNode(&#8220;Home&#8221;, &#8220;/portal/Home.aspx&#8221;, false));<br />
portalNode.Children.AddAsLast(new SPNavigationNode(&#8220;Projects&#8221;, &#8220;/portal/Projects.aspx&#8221;, false));<br />
portalNode.Children.AddAsLast(new SPNavigationNode(&#8220;HR/Benefits&#8221;, &#8220;/portal/HRBenefits.aspx&#8221;, false));<br />
portalNode.Children.AddAsLast(new SPNavigationNode(&#8220;Management&#8221;, &#8220;/portal/Management.aspx&#8221;, false));</p>
<p>site.Navigation.TopNavigationBar.AddAsFirst(portalNode);</p></blockquote>
<p>You have to do this:</p>
<blockquote><p>SPNavigationNode portalNode = new SPNavigationNode(&#8220;My Portal&#8221;, &#8220;/portal/Default.aspx&#8221;, false);<br />
site.Navigation.TopNavigationBar.AddAsFirst(portalNode);</p>
<p>portalNode.Children.AddAsFirst(new SPNavigationNode(&#8220;Home&#8221;, &#8220;/portal/Home.aspx&#8221;, false));<br />
portalNode.Children.AddAsLast(new SPNavigationNode(&#8220;Projects&#8221;, &#8220;/portal/Projects.aspx&#8221;, false));<br />
portalNode.Children.AddAsLast(new SPNavigationNode(&#8220;HR/Benefits&#8221;, &#8220;/portal/HRBenefits.aspx&#8221;, false));<br />
portalNode.Children.AddAsLast(new SPNavigationNode(&#8220;Management&#8221;, &#8220;/portal/Management.aspx&#8221;, false));</p></blockquote>
<p>If you do it the first way, the Navigation property of portalNode.Children will be null and it will cause an ArgumentNullException to be thrown.  At least, I believe this was the cause of the problem.  Adding the parent node (portalNode in my example) to the TopNavigationBar first causes portalNode.Children.Navigation to have a value and therefore no exception is thrown.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2010/02/16/a-lesson-in-adding-sharepoint-navigation-nodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint WebPart Page Dragging/Dropping Problem</title>
		<link>http://blog.benramey.com/2009/11/18/sharepoint-webpart-page-draggingdropping-problem/</link>
		<comments>http://blog.benramey.com/2009/11/18/sharepoint-webpart-page-draggingdropping-problem/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 23:00:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[dragging]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[offset parent]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[webpart]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/2009/11/18/sharepoint-webpart-page-draggingdropping-problem/</guid>
		<description><![CDATA[I was getting an error today while working on my company&#8217;s custom SharePoint theme on the webpart pages when in edit mode. In IE, you can move the webparts round between the different regions on the page by dragging the webpart headers around. To facilitate this, at some point along the line SharePoint calculates the [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting an error today while working on my company&#8217;s custom SharePoint theme on the webpart pages when in edit mode.  In IE, you can move the webparts round between the different regions on the page by dragging the webpart headers around.  To facilitate this, at some point along the line SharePoint calculates the real offset of the element using the MSOLayout_GetRealOffset javascript function.</p>
<p>For some reason, this function was failing and so the dragging and dropping was not working.  To find the real offset, the MSOLayout_GetRealOffset function recursively travels up the DOM tree through each successive element&#8217;s offsetParent from the given element until either the given end element or the body element.  Here&#8217;s the function:</p>
<blockquote><p>function MSOLayout_GetRealOffset(StartingObject,OffsetType, EndParent)<br />
{<br />
var realValue=0;<br />
if(!EndParent) EndParent=document.body;<br />
for (var currentObject=StartingObject; currentObject !=EndParent &amp;&amp; currentObject !=document.body; currentObject=currentObject.offsetParent)<br />
{<br />
realValue+=eval(&#8216;currentObject.offset&#8217;+OffsetType)<br />
}<br />
return realValue;<br />
}</p></blockquote>
<p>As you can see, the end condition for the for loop is when it hits the end element or the body.  In my case, there was no given end element, so the default body element was being used.  The problem, I found out, was that the body element was getting skipped.  When it got to the form element, the next offsetParent would be the html element, so the for loop would not end correctly and eventually currentObject would be null and the eval statement would fail.  Eventually, I tracked the problem down to the form element being relatively positioned in our custom CSS.  This, somehow, was causing the next offsetParent for the form to NOT be the body tag (even though the form element is a child of the body tag) and instead the html tag.</p>
<p>To solve the problem, I am overriding MSOLayout_GetRealOffset in Javascript with a slightly modified version:</p>
<blockquote><p>MSOLayout_GetRealOffset = function (StartingObject, OffsetType, EndParent)<br />
{<br />
var realValue = 0;</p>
<p>if(!EndParent) EndParent = document.body;</p>
<p>for (var currentObject = StartingObject;<br />
currentObject !=EndParent &amp;&amp; currentObject != document.body &amp;&amp; currentObject != null;<br />
currentObject = currentObject.offsetParent)<br />
{<br />
realValue+=eval(&#8216;currentObject.offset&#8217;+OffsetType)<br />
}</p>
<p>return realValue;<br />
};</p></blockquote>
<p>The only difference is the check for currentObject being null.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2009/11/18/sharepoint-webpart-page-draggingdropping-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeKeep</title>
		<link>http://blog.benramey.com/2009/11/16/codekeep/</link>
		<comments>http://blog.benramey.com/2009/11/16/codekeep/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 17:02:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[code snippets]]></category>
		<category><![CDATA[codekeep]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/2009/11/16/codekeep/</guid>
		<description><![CDATA[I found a nice little online tool today to keep track of code snippets for future reference (which was sort of the original intent of this blog). It&#8217;s called CodeKeep. You can add public and private code snippets that you want to reference in the future. You can also search for code snippets from other [...]]]></description>
			<content:encoded><![CDATA[<p>I found a nice little online tool today to keep track of code snippets for future reference (which was sort of the original intent of this blog).</p>
<p>It&#8217;s called <a title="CodeKeep" href="http://www.codekeep.net" target="_self">CodeKeep</a>.  You can add public and private code snippets that you want to reference in the future.  You can also search for code snippets from other developers by language or author.  It&#8217;s pretty nifty.</p>
<p>Make sure to check out the Visual Studio add-ins as well for direct access to your snippets (and others) from inside Visual Studio.</p>
<p>I added a link to my code snippets (which are few as of the writing of this post) on the right-hand side there.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2009/11/16/codekeep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting a Hexadecimal Color to a System.Drawing.Color Object</title>
		<link>http://blog.benramey.com/2009/09/24/121/</link>
		<comments>http://blog.benramey.com/2009/09/24/121/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 14:24:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[ColorTranslator]]></category>
		<category><![CDATA[FromHtml]]></category>
		<category><![CDATA[hexadecimal]]></category>
		<category><![CDATA[System.Drawing.Color]]></category>

		<guid isPermaLink="false">http://blog.benramey.com/?p=121</guid>
		<description><![CDATA[I try to avoid setting styles in my code as much as possible.  However, I ran across a case using a DevExpress PageControl control where there was no possible way to set a certain border by using CSS.  This is because DevExpress wisely (read sarcasm) uses &#8220;border-color: #whatever !important&#8221; in the element&#8217;s style attribute.  So, [...]]]></description>
			<content:encoded><![CDATA[<p>I try to avoid setting styles in my code as much as possible.  However, I ran across a case using a DevExpress PageControl control where there was no possible way to set a certain border by using CSS.  This is because DevExpress wisely (read sarcasm) uses &#8220;border-color: #whatever !important&#8221; in the element&#8217;s style attribute.  So, there is no way to override that style except by setting it on the control in code (or your aspx page).</p>
<p>The particular border I needed is the ContentStyle.Border border of the ASPxPageControl and I needed to set the BorderColor property which is a System.Drawing.Color object.  There isn&#8217;t any straightforward way to get a Color object from a hexadecimal color using the Color object itself.  You have to use the ColorTranslator (also in the System.Drawing namespace) which gives you a FromHtml method and returns the correct Color object.</p>
<blockquote><p>Color hexColor = ColorTranslator.FromHtml(&#8220;#666666&#8243;);</p></blockquote>
<p>Thanks to this guy for the quick answer: <a href="http://www.akxl.net/labs/articles/converting-a-hexadecimal-color-to-a-system.drawing.color-object/" target="_self">http://www.akxl.net/labs/articles/converting-a-hexadecimal-color-to-a-system.drawing.color-object/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.benramey.com/2009/09/24/121/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
