<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>Sebastian Wojciechowski's WebLog</title>
	<link>http://blog.icsharp.net</link>
	<description>.NET Developer</description>
	<pubDate>Wed, 09 Jan 2008 17:23:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>Why my VSTO Office 2003 addin doesn&#8217;t work?</title>
		<link>http://blog.icsharp.net/2008/01/09/why-my-vsto-office-2003-addin-doesnt-work/</link>
		<comments>http://blog.icsharp.net/2008/01/09/why-my-vsto-office-2003-addin-doesnt-work/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 17:20:42 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[Office]]></category>

		<category><![CDATA[Windows Development]]></category>

		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2008/01/09/why-my-vsto-office-2003-addin-doesnt-work/</guid>
		<description><![CDATA[First things you need to know 

You can see the list of detected and enabled addins in Outlook in:      Tools-&#62;Options-&#62;Other-&#62;Advanced Options-&#62;COM Add-Ins&#8230;        If there were some error and addin has not been loaded it will be there with unchecked box. This is where [...]]]></description>
			<content:encoded><![CDATA[<h3><strong>First things you need to know</strong> </h3>
<ol>
<li>You can see the list of detected and enabled addins in Outlook in:      <br /><strong>Tools-&gt;Options-&gt;Other-&gt;Advanced Options-&gt;COM Add-Ins&#8230;        <br /></strong>If there were some error and addin has not been loaded it will be there with unchecked box. This is where you enable disabled addins. When you check addin and click OK - addin will be enabled right away, you don&#8217;t have to restart Outlook       </p>
</li>
<li>If addin prevented Outlook from functioning correctly it will be &quot;hard disabled&quot; and put there:      <br /><strong>Help-&gt;About Microsoft Office Outlook-&gt;Disabled Items&#8230;        <br /></strong>      </li>
<li>When addin fails to load, by default, we don&#8217;t see any info about it or the error details. But we can change it! </li>
</ol>
<ul>
<li>Open command prompt:      <br /><strong>cmd</strong>       </li>
<li>Type:      <br /><strong>set VSTO_SUPPRESSDISPLAYALERTS=0</strong>       </li>
<li>Run Outlook from that command line, should be like this:      <br /><strong>&quot;c:\program files\Microsoft Office\Office11\Outlook.exe&quot;</strong> </li>
</ul>
<p>Now if something fails with addin - you will see it. </p>
<p>This will give you good basic to debug why your addin doesn&#8217;t work.    <br />I recently had a lot of problems with it. I thought about sharing it with you so that you don&#8217;t have to go through it again <img src='http://blog.icsharp.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />     <br />BTW: you won&#8217;t find those information on any forums or other pages <img src='http://blog.icsharp.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h3>Things to verify</h3>
<ol>
<li>Install all required assemblies to GAC. This gives them full permissions so if it&#8217;s something with permissions now it should work. If it does work - check your CAS settings.      </p>
</li>
<li>Check manifest file. If you played with solution reorganization, changed names of projects, classes - there will be a problem.      <br />Take a look at the underlined fragments:
<p><font face="Courier New">&lt;assembly xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot; xmlns:asmv2=&quot;urn:schemas-microsoft-com:asm.v2&quot; manifestVersion=&quot;1.0&quot;&gt;        <br />&#160; &lt;assemblyIdentity <strong><u>name=&quot;Sample.Addin.dll&quot;</u></strong> version=&quot;1.0.0.0&quot; /&gt;         <br />&#160; &lt;asmv2:entryPoint name=&quot;Startup&quot; dependencyName=&quot;dependency0&quot;&gt;         <br />&#160;&#160;&#160; &lt;asmv2:clrClassInvocation <strong><u>class=&quot;Sample.Addin.OutlookAddin&quot;</u></strong> /&gt;         <br />&#160; &lt;/asmv2:entryPoint&gt;         <br />&#160; &lt;asmv2:dependency asmv2:name=&quot;dependency0&quot;&gt;         <br />&#160;&#160;&#160; &lt;asmv2:dependentAssembly&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;assemblyIdentity <strong><u>name=&quot;Sample.Addin&quot; version=&quot;3.2.0.0&quot; publicKeyToken=&quot;c45b3b012bedcf43&quot;</u></strong> /&gt;         <br />&#160;&#160;&#160; &lt;/asmv2:dependentAssembly&gt;         <br />&#160;&#160;&#160; &lt;asmv2:installFrom codebase=&quot;Sample.Addin.dll&quot; /&gt;         <br />&#160; &lt;/asmv2:dependency&gt;         <br />&lt;/assembly&gt;         <br /></font>      </li>
<li>Then take a look at the registry setting in the setup project. Verify all paths.      <br />Make sure that XXX in keys below are equal to ProgID:       <br /><font face="Courier New">HKCU/Software/Classes/XXX/CLSID        <br /></font>and       <br /><font face="Courier New">HKCU/Software/Microsoft/Office/Outlook/Addins/XXX</font>
</li>
<li>Got this:      <br /><font face="Courier New">&quot;Could not load file or assembly &#8216;Microsoft.Office.Interop.Outlook, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&#8217; or one of its dependencies.        <br />System.IO.FileNotFoundException: Could not load file or assembly &#8216;Microsoft.Office.Interop.Outlook, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&#8217; or one of its dependencies&#8230;.&quot;</font>
<p>Yeah, had this too <img src='http://blog.icsharp.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Make sure that you don&#8217;t have any Office 2007 applications installed on the development machine. I had SharePoint Designer. Uninstall them and reopen solution. Dependency to office.dll 12.0.0.0 should be gone (verify it in the dependency list in setup project).       <br />Rebuild setup project. </li>
</ol>
<p>I think that&#8217;s it <img src='http://blog.icsharp.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />     <br />Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2008/01/09/why-my-vsto-office-2003-addin-doesnt-work/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Can TextBox.Text ever be null?</title>
		<link>http://blog.icsharp.net/2007/12/21/can-textboxtext-ever-be-null/</link>
		<comments>http://blog.icsharp.net/2007/12/21/can-textboxtext-ever-be-null/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 16:05:50 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[Windows Development]]></category>

		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2007/12/21/can-textboxtext-ever-be-null/</guid>
		<description><![CDATA[Recently I have been asked this question. Answer is that it cannot be null and will not be null, so you don&#8217;t have to:
.Text != null
Why? Because .Text property in base class does:
    set
    {
        if (value == null)
    [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have been asked this question. Answer is that it cannot be null and will not be null, so you don&#8217;t have to:</p>
<pre>.Text != null</pre>
<p>Why? Because .Text property in base class does:</p>
<pre>    set
    {
        if (value == null)
        {
            value = "";
        }
	.....
    }</pre>
<p>Above is for TextBox from Windows.Forms, as for TextBox from WebControls it&#8217;s the same. The getter looks like this:</p>
<pre>    get
    {
        string str = (string) this.ViewState["Text"];
        if (str != null)
        {
            return str;
        }
        return string.Empty;
    }</pre>
<p>If you don&#8217;t believe me just try to assign a null value <img src='http://blog.icsharp.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2007/12/21/can-textboxtext-ever-be-null/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Lookup fields in custom activity and [%_x005f_String0%]</title>
		<link>http://blog.icsharp.net/2007/11/29/lookup-fields-in-custom-activity-and-_x005f_string0/</link>
		<comments>http://blog.icsharp.net/2007/11/29/lookup-fields-in-custom-activity-and-_x005f_string0/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 16:40:19 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2007/11/29/lookup-fields-in-custom-activity-and-_x005f_string0/</guid>
		<description><![CDATA[If you do a custom activity, configure it to use Lookup fields on field configured as DesignerType=&#8221;StringBuilder&#8221; and instead of field value you get [%_x005f_String0%] you need to process this value with this function: public static string ProcessStringField ( string str, Activity activity, WorkflowContext context ) Here is a code sample:

//...
public static DependencyProperty __ContextProperty =
    [...]]]></description>
			<content:encoded><![CDATA[<p>If you do a custom activity, configure it to use Lookup fields on field configured as DesignerType=&#8221;StringBuilder&#8221; and instead of field value you get [%_x005f_String0%] you need to process this value with this function: public static string ProcessStringField ( string str, Activity activity, WorkflowContext context ) Here is a code sample:</p>
<pre>
//...
public static DependencyProperty __ContextProperty =
    DependencyProperty.Register("__Context", typeof(WorkflowContext), typeof(EmailActivity));
//...
[ValidationOption(ValidationOption.Optional)]public WorkflowContext __Context
{
    get { return (WorkflowContext) base.GetValue(__ContextProperty); }
    set { base.SetValue(__ContextProperty, value); }
}
//...
protected override ActivityExecutionStatus Execute(ActivityExecutionContext provider)
{
    Activity parent = provider.Activity;
    while (parent.Parent != null)
    {
        parent = parent.Parent;
    } 

    string returnValue = Helper.ProcessStringField(stringToProcess, parent, this.__Context));
}</pre>
<p>It seems that if you don&#8217;t have WorkflowContext you can pass null</p>
<pre>string returnValue = Helper.ProcessStringField(stringToProcess, parent, this.__Context));</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2007/11/29/lookup-fields-in-custom-activity-and-_x005f_string0/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Closing Form with WebBrowser control after window.close with C#</title>
		<link>http://blog.icsharp.net/2007/11/21/closing-form-with-webbrowser-control-after-windowclose-with-c/</link>
		<comments>http://blog.icsharp.net/2007/11/21/closing-form-with-webbrowser-control-after-windowclose-with-c/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 15:50:36 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[Windows Development]]></category>

		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2007/11/21/closing-form-with-webbrowser-control-after-windowclose-with-c/</guid>
		<description><![CDATA[I recently had this problem. I have a Windows Form that hosts a WebBrowser control. The page in the WebBrowser control closes itself using window.close and when it does that the Windows Form freezes up.
Found a solution here posted by Jeff Sanders on his blog (thanks man!)
The sample code is provided in VB.NET Below is [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had this problem. I have a Windows Form that hosts a WebBrowser control. The page in the WebBrowser control closes itself using window.close and when it does that the Windows Form freezes up.</p>
<p>Found a solution <a target="_blank" href="http://blogs.msdn.com/jpsanders/archive/2007/05/25/how-to-close-the-form-hosting-the-webbrowser-control-when-scripting-calls-window-close-in-the-net-framework-version-2-0.aspx"><font color="#488f0a">here</font></a> posted by <a target="_blank" href="http://blogs.msdn.com/jpsanders/default.aspx"><font color="#488f0a">Jeff Sanders</font></a> on his <a target="_blank" href="http://blogs.msdn.com/jpsanders/default.aspx"><font color="#488f0a">blog</font></a> (thanks man!)</p>
<p>The sample code is provided in VB.NET Below is the same code rewritten in C#</p>
<pre>
public class ExtendedWebBrowser : WebBrowser
    {
        public const int WM_PARENTNOTIFY = 0x0210;
        public const int WM_DESTROY = 2;

        public delegate void ClosingEventHandler();
        public event ClosingEventHandler Closing;

        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case WM_PARENTNOTIFY:
                    if (!this.DesignMode)
                    {
                        if (m.WParam.ToInt32() == WM_DESTROY)
                        {
                            if (this.Closing != null)
                            {
                                this.Closing();
                            }
                        }
                    }
                    base.DefWndProc(ref m);
                    break;

                default:
                    base.WndProc(ref m);
                    break;
            }
        }
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2007/11/21/closing-form-with-webbrowser-control-after-windowclose-with-c/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zoom in / Zoom out code in Visual Studio</title>
		<link>http://blog.icsharp.net/2007/09/09/zoom-in-zoom-out-code-in-visual-studio/</link>
		<comments>http://blog.icsharp.net/2007/09/09/zoom-in-zoom-out-code-in-visual-studio/#comments</comments>
		<pubDate>Sun, 09 Sep 2007 21:15:48 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2007/09/09/zoom-in-zoom-out-code-in-visual-studio/</guid>
		<description><![CDATA[When I browse code looking for something or when I take a look at a new class I want to see as much code as I can. But then when I enter the &#x201C;coding&#x201D; mode I want to focus on code that I write and I want to have bigger font to make it easier [...]]]></description>
			<content:encoded><![CDATA[<p>When I browse code looking for something or when I take a look at a new class I want to see as much code as I can. But then when I enter the &#x201C;coding&#x201D; mode I want to focus on code that I write and I want to have bigger font to make it easier to read.</p>
<p>To achieve this you could change the font size in options, well this is what you have to do. But doing it manually is not real.</p>
<p>The simplest solution is to just make font bigger/smaller using a shortcut key. We could write macro for that&#x2026; wait, hold on&#x2026; what I see, Visual Studio already has macro for making source code editor font bigger/smaller, sweet&#x2013; high five!    </p>
<p><img id="id" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="116" alt="macros" src="http://blog.icsharp.net/wp-content/uploads/2007/09/macros.gif" width="437" border="0" /> </p>
<p>So the only thing we have to do is just bind shortcut keys to those macros.</p>
<p>I use CTRL+A for making the font bigger and CTRL+Z for making it smaller (just like changing gears in Need For Speed, well just without CTRL key).</p>
<p>So in results we have something like this:</p>
<p><img id="id" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="333" alt="test" src="http://blog.icsharp.net/wp-content/uploads/2007/09/test.gif" width="500" border="0" /> </p>
<p> The first time the macro is executed it runs slowly, but next calls are fast.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2007/09/09/zoom-in-zoom-out-code-in-visual-studio/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Error - Microsoft Office SharePoint Server 2007 Installation and Configuration Lab</title>
		<link>http://blog.icsharp.net/2007/08/11/error-microsoft-office-sharepoint-server-2007-installation-and-configuration-lab/</link>
		<comments>http://blog.icsharp.net/2007/08/11/error-microsoft-office-sharepoint-server-2007-installation-and-configuration-lab/#comments</comments>
		<pubDate>Sat, 11 Aug 2007 13:12:31 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[SharePoint]]></category>

		<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2007/08/11/error-microsoft-office-sharepoint-server-2007-installation-and-configuration-lab/</guid>
		<description><![CDATA[Ups!  

]]></description>
			<content:encoded><![CDATA[<p>Ups! <img src='http://blog.icsharp.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://blog.icsharp.net/wp-content/uploads/2007/09/virtuallab_error.jpg" title="virtuallab_error.jpg"><img border="0" src="http://blog.icsharp.net/wp-content/uploads/2007/09/virtuallab_error.jpg" alt="virtuallab_error.jpg" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2007/08/11/error-microsoft-office-sharepoint-server-2007-installation-and-configuration-lab/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Not implemented 0&#215;80004001 while capturing entire screen in Windows Media Encoder 9</title>
		<link>http://blog.icsharp.net/2007/08/11/not-implemented-0x80004001-while-capturing-entire-screen-in-windows-media-encoder-9/</link>
		<comments>http://blog.icsharp.net/2007/08/11/not-implemented-0x80004001-while-capturing-entire-screen-in-windows-media-encoder-9/#comments</comments>
		<pubDate>Sat, 11 Aug 2007 13:11:31 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2007/08/11/not-implemented-0x80004001-while-capturing-entire-screen-in-windows-media-encoder-9/</guid>
		<description><![CDATA[If you get:
 “1 error(s) occurred during this session. Click Error Log for details.“
“Not implemented 0&#215;80004001“
   
errors while Capture screen, Entire screen using Windows Media Encoder 9 that probably means that you are in multiple monitor mode.
Switch to one monitor mode and it should work.
]]></description>
			<content:encoded><![CDATA[<p>If you get:</p>
<p> <em>“1 error(s) occurred during this session. Click Error Log for details.“</em></p>
<p><em>“Not implemented 0&#215;80004001“</em></p>
<p><a href="http://blog.icsharp.net/wp-content/uploads/2007/08/wme_error1.gif" title="wme_error1.gif"></a> <a href="http://blog.icsharp.net/wp-content/uploads/2007/08/wme_error1.gif" title="wme_error1.gif"><img border="0" src="http://blog.icsharp.net/wp-content/uploads/2007/08/wme_error1.gif" alt="wme_error1.gif" /></a>  <a href="http://blog.icsharp.net/wp-content/uploads/2007/08/wme_error2.gif" title="wme_error2.gif"><img border="0" src="http://blog.icsharp.net/wp-content/uploads/2007/08/wme_error2.gif" alt="wme_error2.gif" /></a><a href="http://blog.icsharp.net/wp-content/uploads/2007/08/wme_error2.gif" title="wme_error2.gif"></a></p>
<p>errors while <strong>Capture screen</strong>, <strong>Entire screen</strong> using <strong>Windows Media Encoder 9</strong> that probably means that you are in multiple monitor mode.</p>
<p>Switch to one monitor mode and it should work.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2007/08/11/not-implemented-0x80004001-while-capturing-entire-screen-in-windows-media-encoder-9/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The given assembly name or codebase was invalid. (Exception from HRESULT: 0&#215;80131047)</title>
		<link>http://blog.icsharp.net/2007/07/15/the-given-assembly-name-or-codebase-was-invalid-exception-from-hresult-0x80131047/</link>
		<comments>http://blog.icsharp.net/2007/07/15/the-given-assembly-name-or-codebase-was-invalid-exception-from-hresult-0x80131047/#comments</comments>
		<pubDate>Sun, 15 Jul 2007 12:08:39 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[SharePoint]]></category>

		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2007/07/15/the-given-assembly-name-or-codebase-was-invalid-exception-from-hresult-0x80131047/</guid>
		<description><![CDATA[
If you have this error and  you did all of those things:

reinstalled DLLs,
checked custom aspx if they reference any misspelled DLLs, 
removed one by one all the custom solutions,
ran the “SharePoint Products and Technologies Configuration Wizard”,
thought “Let’s go for a lunch and then reinstall this machine”

Check the web.config Best thing would be to take it from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.icsharp.net/wp-content/uploads/2007/07/compare.GIF" title="compare.GIF"></a><a href="http://blog.icsharp.net/wp-content/uploads/2007/07/compare.GIF" title="compare.GIF"></a><a href="http://blog.icsharp.net/wp-content/uploads/2007/07/compare.GIF" title="compare.GIF"></a><a href="http://blog.icsharp.net/wp-content/uploads/2007/07/compare.GIF" title="compare.GIF"></a><a href="http://blog.icsharp.net/wp-content/uploads/2007/07/compare.GIF" title="compare.GIF"></a><a href="http://blog.icsharp.net/wp-content/uploads/2007/07/compare.GIF" title="compare.GIF"></a><a href="http://blog.icsharp.net/wp-content/uploads/2007/07/errorpage.GIF" title="errorpage.GIF"><img border="0" src="http://blog.icsharp.net/wp-content/uploads/2007/07/errorpage.GIF" alt="errorpage.GIF" /></a></p>
<p>If you have this error and  you did all of those things:</p>
<ul>
<li>reinstalled DLLs,</li>
<li>checked custom aspx if they reference any misspelled DLLs, </li>
<li>removed one by one all the custom solutions,</li>
<li>ran the “SharePoint Products and Technologies Configuration Wizard”,</li>
<li>thought “Let’s go for a lunch and then reinstall this machine”</li>
</ul>
<p>Check the web.config Best thing would be to take it from other machine and compare with a diff tool.<br />
Take a look at what was wrong in our case:</p>
<p><a href="http://blog.icsharp.net/wp-content/uploads/2007/07/compare12.gif" title="compare12.gif"><img border="0" src="http://blog.icsharp.net/wp-content/uploads/2007/07/compare12.gif" alt="compare12.gif" /></a>,</p>
<p>Lesson learned!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2007/07/15/the-given-assembly-name-or-codebase-was-invalid-exception-from-hresult-0x80131047/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HeaderImageUrl overwrites HeaderText</title>
		<link>http://blog.icsharp.net/2006/11/29/headerimageurl-overwrites-headertext/</link>
		<comments>http://blog.icsharp.net/2006/11/29/headerimageurl-overwrites-headertext/#comments</comments>
		<pubDate>Wed, 29 Nov 2006 19:10:44 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[SharePoint]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2006/11/29/headerimageurl-overwrites-headertext/</guid>
		<description><![CDATA[If you set up HeaderImageUrl property in HyperLinkColumn, the text from HeaderText will not be shown.
Take this code for example:
&#60;asp:HyperLinkColumn DataTextField=&#8221;urn:schemas-microsoft-com:office:office#Author&#8221;
DataNavigateUrlField=&#8221;urn:schemas-microsoft-com:office:office#Author&#8221;
DataNavigateUrlFormatString=&#8221;/MySite/Public.aspx?user={0}&#8221;
HeaderText=&#8221;Author&#8221; HeaderImageUrl=&#8221;/_layouts/images/imnhdr.gif&#8221;&#62;
The &#8220;Author&#8221; text will not be shown in this column&#8217;s header. Only the icon will be visible. Well there is a simple way to solve 
this:
 &#60;asp:HyperLinkColumn DataTextField=&#8221;urn:schemas-microsoft-com:office:office#Author&#8221;
DataNavigateUrlField=&#8221;urn:schemas-microsoft-com:office:office#Author&#8221;
DataNavigateUrlFormatString=&#8221;/MySite/Public.aspx?user={0}&#8221;
HeaderText=&#8221;&#60;img src=&#8217;/_layouts/images/imnhdr.gif&#8217;/&#62;Author&#8221;&#62;
hey, it works   
]]></description>
			<content:encoded><![CDATA[<p>If you set up HeaderImageUrl property in HyperLinkColumn, the text from HeaderText will not be shown.<br />
Take this code for example:</p>
<p><font face="Courier New">&lt;asp:HyperLinkColumn DataTextField=&#8221;urn:schemas-microsoft-com:office:office#Author&#8221;<br />
DataNavigateUrlField=&#8221;urn:schemas-microsoft-com:office:office#Author&#8221;<br />
DataNavigateUrlFormatString=&#8221;/MySite/Public.aspx?user={0}&#8221;<br />
<strong>HeaderText=&#8221;Author&#8221; HeaderImageUrl=&#8221;/_layouts/images/imnhdr.gif&#8221;</strong>&gt;</font></p>
<p><font face="Curier New">The &#8220;Author&#8221; text will not be shown in this column&#8217;s header. Only the icon will be visible. Well there is a simple way to solve </p>
<p>this:</font></p>
<p><font face="Curier New"> </font><font face="Courier New">&lt;asp:HyperLinkColumn DataTextField=&#8221;urn:schemas-microsoft-com:office:office#Author&#8221;<br />
DataNavigateUrlField=&#8221;urn:schemas-microsoft-com:office:office#Author&#8221;<br />
DataNavigateUrlFormatString=&#8221;/MySite/Public.aspx?user={0}&#8221;<br />
<strong>HeaderText=&#8221;&lt;img src=&#8217;/_layouts/images/imnhdr.gif&#8217;/&gt;Author&#8221;</strong>&gt;</font></p>
<p><font face="Curier New">hey, it works <img src='http://blog.icsharp.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </font><font face="Curier New"> </font></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2006/11/29/headerimageurl-overwrites-headertext/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to force Visual Studio to recompile project at &#34;Build&#34; action</title>
		<link>http://blog.icsharp.net/2006/09/09/how-to-force-visual-studio-to-recompile-project-at-build-action/</link>
		<comments>http://blog.icsharp.net/2006/09/09/how-to-force-visual-studio-to-recompile-project-at-build-action/#comments</comments>
		<pubDate>Sat, 09 Sep 2006 18:35:44 +0000</pubDate>
		<dc:creator>Sebastian</dc:creator>
		
		<category><![CDATA[Tips]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.icsharp.net/2006/09/09/how-to-force-visual-studio-to-recompile-project-at-build-action/</guid>
		<description><![CDATA[Our solution contains about 30 projects. There are web apps, windows services, web controls, web parts (usual stuff for SharePointers). One of them is a BuildApp. It contains only one empty file class1.cs but it&#8217;s there to register DLLs in GAC, web parts in SPS and restart appPool.
After installing Visual Studio 2003 SP1 the BuildApp [...]]]></description>
			<content:encoded><![CDATA[<p>Our solution contains about 30 projects. There are web apps, windows services, web controls, web parts (usual stuff for SharePointers). One of them is a BuildApp. It contains only one empty file class1.cs but it&#8217;s there to register DLLs in GAC, web parts in SPS and restart appPool.</p>
<p>After installing Visual Studio 2003 SP1 the BuildApp is not compiled during build operation. VS detects that it&#8217;s up to date and leaves it. It&#8217;s cool, it should be like that (why it compiled it before?)</p>
<p>But if BuildApp is not compiled, post build events are not fired. This forces us to run them manually. Personally I am a lazy but productive developer so I decided to fix it.</p>
<p>To fool VS to think that the project needs to be compiled, open one of the compiled files (the empty file which nobody will edit again), change date to something in far future like 2010, edit file and save it.<br />
If you use SourceSafe edit the file outside the VS and remove &#8220;read only&#8221; attribute manually (apply is after edit has been made).</p>
<p>Thanks to this trick VS will compile the project every time you do the &#8220;build&#8221; and run post build events - sweet!</p>
<p>It works for Visual Studio 2003 SP1 and Visual Studio 2005</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.icsharp.net/2006/09/09/how-to-force-visual-studio-to-recompile-project-at-build-action/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
