<?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>Frank Coding</title>
	<atom:link href="http://www.frankwisniewski.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.frankwisniewski.net</link>
	<description>,NET, C#, and other Cool Stuff</description>
	<lastBuildDate>Wed, 25 Jan 2012 15:07:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The elusive list of icons for visual studio plugins/addins</title>
		<link>http://www.frankwisniewski.net/2012/01/the-elusive-list-of-icons-for-visual-studio-pluginsaddins/</link>
		<comments>http://www.frankwisniewski.net/2012/01/the-elusive-list-of-icons-for-visual-studio-pluginsaddins/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 15:00:15 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Addin]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/?p=66</guid>
		<description><![CDATA[I love Microsoft but sometimes they just don’t make it easy.&#160; The documentation for visual studio add-in development talks about passing an Id of the icon you want to use when adding new commands to visual studio menus but they &#8230; <a href="http://www.frankwisniewski.net/2012/01/the-elusive-list-of-icons-for-visual-studio-pluginsaddins/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I love Microsoft but sometimes they just don’t make it easy.&nbsp; The documentation for visual studio add-in development talks about passing an Id of the icon you want to use when adding new commands to visual studio menus but they never tell you where to find that list of icons.&nbsp; From the MSDN documentation for Commands.AddNamedCommand Method:</p>
<blockquote><dl>
<dt>MSOButton
<dd>Type: <a href="http://msdn.microsoft.com/en-us/library/system.boolean.aspx">System.Boolean</a><br />Required. Indicates whether the named command&#8217;s button picture is an Office picture. True = button. If MSOButton is False, then Bitmap is the ID of a 16&#215;16 bitmap resource (but not an icon resource) in a Visual C++ resource DLL that must reside in a folder with the language&#8217;s locale identifier (1033 for English).</dd>
</dl>
<dl>
<dt>Bitmap
<dd>Type: <a href="http://msdn.microsoft.com/en-us/library/system.int32.aspx">System.Int32</a><br />Optional. The ID of a bitmap to display on the button.</dd>
</dl>
</blockquote>
<p>Luckily, someone else on the internet has stepped up and done the work.&nbsp; Here is a link to their site:</p>
<p><a href="http://www.kebabshopblues.co.uk/2007/01/04/visual-studio-2005-tools-for-office-commandbarbutton-faceid-property/">http://www.kebabshopblues.co.uk/2007/01/04/visual-studio-2005-tools-for-office-commandbarbutton-faceid-property/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2012/01/the-elusive-list-of-icons-for-visual-studio-pluginsaddins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The mobile answer for those using ext.net</title>
		<link>http://www.frankwisniewski.net/2011/12/the-mobile-answer-for-those-using-ext-net/</link>
		<comments>http://www.frankwisniewski.net/2011/12/the-mobile-answer-for-those-using-ext-net/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 15:34:25 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ext.net]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/?p=62</guid>
		<description><![CDATA[Ext.net is by far the best java script client side library out there for ASP.net developers but it is a bit heavy to use on mobile devices.&#160; Thanks to this project there is now a Ext.net type solution for the &#8230; <a href="http://www.frankwisniewski.net/2011/12/the-mobile-answer-for-those-using-ext-net/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="www.ext.net">Ext.net</a> is by far the best java script client side library out there for ASP.net developers but it is a bit heavy to use on mobile devices.&nbsp; Thanks to this project there is now a Ext.net type solution for the mobile space!</p>
<p><a href="http://touchnet.codeplex.com/">http://touchnet.codeplex.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2011/12/the-mobile-answer-for-those-using-ext-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use a ConfigurationElementCollection with custom attributes</title>
		<link>http://www.frankwisniewski.net/2011/12/how-to-use-a-configurationelementcollection-with-custom-attributes/</link>
		<comments>http://www.frankwisniewski.net/2011/12/how-to-use-a-configurationelementcollection-with-custom-attributes/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 13:16:49 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[My Articles]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/2011/12/how-to-use-a-configurationelementcollection-with-custom-attributes/</guid>
		<description><![CDATA[The other day I was working on a utility class that did xslt transformations and I wanted to make it read some file paths from the app/web.config file.&#160; I found some great examples on the web about using custom configuration &#8230; <a href="http://www.frankwisniewski.net/2011/12/how-to-use-a-configurationelementcollection-with-custom-attributes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The other day I was working on a utility class that did xslt transformations and I wanted to make it read some file paths from the app/web.config file.&nbsp; I found some great examples on the web about using custom configuration sections for .Net 2.0 (just seach google for &#8220;custom config sections&#8221;) but then I hit a road block when I wanted my config section to look like this:</p>
<blockquote><p>&lt;XSLTTransformDefinitions&gt;&nbsp;&nbsp;&nbsp; &lt;&#8211; Inherits ConfigurationSection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TransformGroups&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&#8211; Inherits ConfigurationElementCollection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TransformGroup GroupName=&#8221;Foo&#8221;&gt;&nbsp;&nbsp;&nbsp; &lt;&#8211; Inherits ConfigurationElementCollection
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Transforms&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Transform Name=&#8221;Foo1&#8243; FilePath=&#8221;aklsdjf&#8221;/&gt;&nbsp; &lt;&#8211; Inherits ConfigurationElement<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Transform Name=&#8221;Foo2&#8243; FilePath=&#8221;asdfjalsd;fj&#8221;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Transform Name=&#8221;Foo3&#8243; FilePath=&#8221;alsjfajklsd&#8221;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Transforms&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Transforms GroupName=&#8221;Bar&#8221;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Transform Name=&#8221;Bar1&#8243; FilePath=&#8221;aklsdjf&#8221;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Transform Name=&#8221;Bar2&#8243; FilePath=&#8221;asdfjalsd;fj&#8221;/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Transforms&gt;
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/TransformGroup&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/TransformGroups&gt;<br />&lt;/XSLTTransformDefinitions&gt;</p>
</blockquote>
<p>Everything was going great until i realized that I needed to have two layers of collections, I needed my first collection (TransformGroup) to have an attribute that I could use as an identification key later on in the code.&nbsp; No matter what I did I could not get the configuration manager to read the custom attribute on the &#8220;TransformGroup&#8221; configurationelementcollection.&nbsp; When you want a property read by the configuration manager during the GetSection call you are suppose to just add the &#8220;ConfigurationProperty&#8221; attribute to your property statement in your class like so:
<pre class="csharpcode">&lt;ConfigurationProperty(<span class="str">"Name"</span>, IsKey:=<span class="kwrd">True</span>, isrequired:=<span class="kwrd">True</span>)&gt; _
<span class="kwrd">Public</span> <span class="kwrd">Property</span> Name() <span class="kwrd">As</span> <span class="kwrd">String</span>
         <span class="kwrd">Get</span>
                <span class="kwrd">Return</span> <span class="kwrd">DirectCast</span>(<span class="kwrd">Me</span>(<span class="str">"Name"</span>), <span class="kwrd">String</span>)
         <span class="kwrd">End</span> <span class="kwrd">Get</span>
         <span class="kwrd">Set</span>(<span class="kwrd">ByVal</span> value <span class="kwrd">As</span> <span class="kwrd">String</span>)
                <span class="kwrd">Me</span>(<span class="str">"Name"</span>) = value
         <span class="kwrd">End</span> <span class="kwrd">Set</span>
<span class="kwrd">End</span> Property</pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>This works fine when you inherit from the configurationelement and you get access to the base collection via the Me(&#8220;SomeAttributeName&#8221;) statements&nbsp; but when you try the same thing in a class that inherits from configurationelementcollection you get an error because the base collection contains in this case &#8220;Transform&#8221; elements, not attributes read from the element.&nbsp; After some time of searching and a little bit of trial and error I figured out a hack.&nbsp; What you have to do is use the &#8220;OnDeserializeUnrecognizedAttribute&#8221; method.&nbsp; You can override this method in you class and when the configuration manager finds any attributes on your xml that are not defined by a class somewhere it calls this method allowing you to do something with what it found.&nbsp; For my solution I just created a property on my &#8220;TransformGroup&#8221; class called group name and did not add any code attributes to it, then I overrided the method like this:
<pre class="csharpcode"><span class="kwrd">Protected</span> <span class="kwrd">Overrides</span> <span class="kwrd">Function</span> OnDeserializeUnrecognizedAttribute(<span class="kwrd">ByVal</span> name <span class="kwrd">As</span> <span class="kwrd">String</span>, <span class="kwrd">ByVal</span> value <span class="kwrd">As</span> <span class="kwrd">String</span>) <span class="kwrd">As</span> <span class="kwrd">Boolean</span>
        <span class="kwrd">If</span> (name = <span class="str">"GroupName"</span>) <span class="kwrd">Then</span>
               <span class="kwrd">Me</span>._GroupName = value
               <span class="kwrd">Return</span> <span class="kwrd">True</span>
        <span class="kwrd">End</span> <span class="kwrd">If</span>
        <span class="kwrd">Return</span> <span class="kwrd">MyBase</span>.OnDeserializeUnrecognizedAttribute(name, value)
<span class="kwrd">End</span> Function</pre>
<p>It is a bit of a hack but it works.&nbsp; All you have to do is return true from this function, otherwise .Net will throw an exception.</p>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2011/12/how-to-use-a-configurationelementcollection-with-custom-attributes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to make a CheckBox fire the ItemCommand Event of a Repeater</title>
		<link>http://www.frankwisniewski.net/2011/12/how-to-make-a-checkbox-fire-the-itemcommand-event-of-a-repeater/</link>
		<comments>http://www.frankwisniewski.net/2011/12/how-to-make-a-checkbox-fire-the-itemcommand-event-of-a-repeater/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 13:06:26 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[My Articles]]></category>
		<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/2011/12/how-to-make-a-checkbox-fire-the-itemcommand-event-of-a-repeater/</guid>
		<description><![CDATA[At work today I tried to do something I though would be simple, I needed to add a check box control to a repeater&#8217;s item template and have it fire the ItemCommand event on the repeater.&#160; The button and link &#8230; <a href="http://www.frankwisniewski.net/2011/12/how-to-make-a-checkbox-fire-the-itemcommand-event-of-a-repeater/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At work today I tried to do something I though would be simple, I needed to add a check box control to a repeater&#8217;s item template and have it fire the ItemCommand event on the repeater.&nbsp; The button and link button controls do this without a problem but for some reason Microsoft decided that the check box was going to be different.&nbsp; Luckily we have great tools like <a href="http://www.aisto.com/roeder/dotnet/">Reflector</a> to help in situations like this, if you dig into the Repeater&#8217;s source code you will find out that the ItemCommand event gets fired by event bubbling.&nbsp; When you add a button or link button to a repeaters template and click on it it will eventually run this code as part of it&#8217;s post back.</p>
<pre class="csharpcode"><span class="kwrd">protected</span> <span class="kwrd">virtual</span> <span class="kwrd">void</span> RaisePostBackEvent(<span class="kwrd">string</span> eventArgument)
{
     <span class="kwrd">base</span>.ValidateEvent(<span class="kwrd">this</span>.UniqueID, eventArgument);
     <span class="kwrd">if</span> (<span class="kwrd">this</span>.CausesValidation)
     {
         <span class="kwrd">this</span>.Page.Validate(<span class="kwrd">this</span>.ValidationGroup);
     }
     <span class="kwrd">this</span>.OnClick(EventArgs.Empty);
     <span class="kwrd">this</span>.OnCommand(<span class="kwrd">new</span> CommandEventArgs(<span class="kwrd">this</span>.CommandName, <span class="kwrd">this</span>.CommandArgument));
}</pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>Notice how the last line in this code calls &#8220;this.OnCommand&#8221; and passes a CommandEventArgs instance with command name and command argument.&nbsp; The button and link button have this extra code while the checkbox does not.&nbsp; The code for this method looks like this:</p>
<pre class="csharpcode"><span class="kwrd">protected</span> <span class="kwrd">virtual</span> <span class="kwrd">void</span> OnCommand(CommandEventArgs e)
{
    CommandEventHandler handler = (CommandEventHandler) <span class="kwrd">base</span>.Events[EventCommand];
    <span class="kwrd">if</span> (handler != <span class="kwrd">null</span>)
    {
        handler(<span class="kwrd">this</span>, e);
    }
    <span class="kwrd">base</span>.RaiseBubbleEvent(<span class="kwrd">this</span>, e);
}</pre>
<p>All the magic that makes the button and link button work is right here.&nbsp; Calling &#8220;base.RaiseBubbleEvent&#8221; and passing it the same CommandEventArgs from above allows the repeater control to catch this event later on in its OnBubbleEvent.&nbsp; The on bubble event for the repeater looks like this:</p>
<pre class="csharpcode"><span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">bool</span> OnBubbleEvent(<span class="kwrd">object</span> sender, EventArgs e)
{
    <span class="kwrd">bool</span> flag = <span class="kwrd">false</span>;
    <span class="kwrd">if</span> (e <span class="kwrd">is</span> RepeaterCommandEventArgs)
    {
        <span class="kwrd">this</span>.OnItemCommand((RepeaterCommandEventArgs) e);
        flag = <span class="kwrd">true</span>;
    }
    <span class="kwrd">return</span> flag;
}</pre>
<p>The ItemCommand event is only fired here and only if the eventargs type is RepeaterCommandEventArgs.&nbsp; Since the standard CheckBox control does not call the RaiseBubbleEvent like a button or link button it&#8217;s checkchanged event will never make it here.&nbsp; But there is a very simple solution to make it work this way, all you have to do is create a custom checkbox control that calls RaiseBubbleEvent during it&#8217;s OnCheckChanged event.&nbsp; Here is a an example, this CheckBoxRepeaterAware control is the same as a regular CheckBox except for the addition of two properties and an overridden OnCheckChanged event. </p>
<pre class="csharpcode"><span class="kwrd">public</span> <span class="kwrd">class</span> CheckBoxRepeaterAware : CheckBox
{
   <span class="preproc">#region</span> Properties

   <span class="preproc">#region</span> CommandName

   <span class="kwrd">public</span> <span class="kwrd">string</span> CommandName
   {
       get
        {
            <span class="kwrd">if</span> (<span class="kwrd">this</span>.ViewState[<span class="str">"CommandName"</span>] == <span class="kwrd">null</span>)
            {
                <span class="kwrd">return</span> <span class="kwrd">string</span>.Empty;
            }
            <span class="kwrd">else</span>
            {
                <span class="kwrd">return</span> <span class="kwrd">this</span>.ViewState[<span class="str">"CommandName"</span>] <span class="kwrd">as</span> <span class="kwrd">string</span>;
            }
        }
        set
        {
            <span class="kwrd">this</span>.ViewState[<span class="str">"CommandName"</span>] = <span class="kwrd">value</span>;
        }
    }

    <span class="preproc">#endregion</span>

    <span class="preproc">#region</span> CommandArgument

    <span class="kwrd">public</span> <span class="kwrd">string</span> CommandArgument
    {
        get
        {
            <span class="kwrd">if</span> (<span class="kwrd">this</span>.ViewState[<span class="str">"CommandArgument"</span>] == <span class="kwrd">null</span>)
            {
                <span class="kwrd">return</span> <span class="kwrd">string</span>.Empty;
            }
            <span class="kwrd">else</span>
            {
                <span class="kwrd">return</span> <span class="kwrd">this</span>.ViewState[<span class="str">"CommandArgument"</span>] <span class="kwrd">as</span> <span class="kwrd">string</span>;
            }
        }
        set
        {
            <span class="kwrd">this</span>.ViewState[<span class="str">"CommandArgument"</span>] = <span class="kwrd">value</span>;
        }
    }

    <span class="preproc">#endregion</span>

    <span class="preproc">#endregion</span>

    <span class="preproc">#region</span> Procedures

    <span class="preproc">#region</span> On Checked Changed

    <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnCheckedChanged(EventArgs e)
    {
        <span class="rem">//create a new event args of type command event args</span>
        CommandEventArgs ce = <span class="kwrd">new</span> CommandEventArgs(<span class="kwrd">this</span>.CommandName, <span class="kwrd">this</span>.CommandArgument);

        <span class="rem">//allow the base checkbox to handle the event as normal</span>
        <span class="kwrd">base</span>.OnCheckedChanged(e);

        <span class="rem">//raise the contorls method RaiseBubbleEvent</span>
        <span class="kwrd">base</span>.RaiseBubbleEvent(<span class="kwrd">this</span>, ce);

    }
    <span class="preproc">#endregion</span>

    <span class="preproc">#endregion</span>

}</pre>
<p>As you can tell, in the OnCheckChanged event we are calling &#8220;base.RaiseBubbleEvent&#8221; and passing it the command name and command argument.&nbsp; By doing this, the repeater will be able to fire it&#8217;s ItemCommand event for us.&nbsp; Again, I am not sure why Microsoft didn&#8217;t just implement this in the first place for the check box control but at least the framework is flexible enough that we can do it now.&nbsp; The last thing we need to do to make this solution even easier is add a tag mapping in our web config to allow the new CheckBoxRepeaterAware control to replace all instances of CheckBox controls in our application.&nbsp; To do that we add the following to the web config inside the pages node:</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">tagMapping</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">tagType</span><span class="kwrd">="System.Web.UI.WebControls.CheckBox"</span> <span class="attr">mappedTagType</span><span class="kwrd">="CheckBoxRepeaterAwareDemo.Classes.CheckBoxRepeaterAware"</span><span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">tagMapping</span><span class="kwrd">&gt;</span>
</pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2011/12/how-to-make-a-checkbox-fire-the-itemcommand-event-of-a-repeater/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Seriously Funny Stuff</title>
		<link>http://www.frankwisniewski.net/2011/12/seriously-funny-stuff/</link>
		<comments>http://www.frankwisniewski.net/2011/12/seriously-funny-stuff/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 16:21:51 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Funny]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/2011/12/seriously-funny-stuff/</guid>
		<description><![CDATA[My favorite part is the pants at the end]]></description>
			<content:encoded><![CDATA[<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:7db1f0f6-9ac0-41cc-ad66-607ae9ee8ab9" class="wlWriterEditableSmartContent">
<div><object width="560" height="315"><param name="movie" value="http://www.youtube.com/v/xnSBIMfmv7I?hl=en&amp;hd=1"></param><embed src="http://www.youtube.com/v/xnSBIMfmv7I?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="560" height="315"></embed></object></div>
</div>
<p>My favorite part is the pants at the end <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.frankwisniewski.net/wp-content/uploads/2011/12/wlEmoticon-smile.png"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2011/12/seriously-funny-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Admin Scripting Utils (Free)</title>
		<link>http://www.frankwisniewski.net/2010/02/admin-scripting-utils-free/</link>
		<comments>http://www.frankwisniewski.net/2010/02/admin-scripting-utils-free/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 15:34:45 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/admin-scripting-utils-free.aspx</guid>
		<description><![CDATA[http://www.autoitscript.com/autoit3/index.shtml Frank Wisniewski  &#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.autoitscript.com/autoit3/index.shtml">http://www.autoitscript.com/autoit3/index.shtml</a></p>
<p><a href="http://www.frankwisniewski.net">Frank Wisniewski</a>  <a href="http://www.frankwisniewski.net/admin-scripting-utils-free.aspx">&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2010/02/admin-scripting-utils-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extjs Theme Builder</title>
		<link>http://www.frankwisniewski.net/2010/01/extjs-theme-builder/</link>
		<comments>http://www.frankwisniewski.net/2010/01/extjs-theme-builder/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 21:40:30 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/extjs-theme-builder.aspx</guid>
		<description><![CDATA[http://extbuilder.dynalias.com/springapp/mainpage.htm when it is available, see thread: http://extui.com/forum/showthread.php?t=79679 Frank Wisniewski&#160;&#160;&#8230;]]></description>
			<content:encoded><![CDATA[<p><a title='http://extbuilder.dynalias.com/springapp/mainpage.htm' href='http://extbuilder.dynalias.com/springapp/mainpage.htm'>http://extbuilder.dynalias.com/springapp/mainpage.htm</a></p>
<p>when it is available, see thread:</p>
<p><a title='http://extui.com/forum/showthread.php?t=79679' href='http://extui.com/forum/showthread.php?t=79679'>http://extui.com/forum/showthread.php?t=79679</a></p>
<p><a href='http://www.frankwisniewski.net'>Frank Wisniewski</a>&nbsp;&nbsp;<a href='http://www.frankwisniewski.net/extjs-theme-builder.aspx'>&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2010/01/extjs-theme-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to do custom expression building for ASP.Net pages</title>
		<link>http://www.frankwisniewski.net/2009/12/how-to-do-custom-expression-building-for-asp-net-pages/</link>
		<comments>http://www.frankwisniewski.net/2009/12/how-to-do-custom-expression-building-for-asp-net-pages/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 22:18:17 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Asp.net]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/how-to-do-custom-expression-building-for-aspnet-pages.aspx</guid>
		<description><![CDATA[http://www.codeproject.com/KB/aspnet/CustomExpressionBuilder.aspx Frank Wisniewski&#160;&#160;&#8230;]]></description>
			<content:encoded><![CDATA[<p><a title='http://www.codeproject.com/KB/aspnet/CustomExpressionBuilder.aspx' href='http://www.codeproject.com/KB/aspnet/CustomExpressionBuilder.aspx'>http://www.codeproject.com/KB/aspnet/CustomExpressionBuilder.aspx</a></p>
<p><a href='http://www.frankwisniewski.net'>Frank Wisniewski</a>&nbsp;&nbsp;<a href='http://www.frankwisniewski.net/how-to-do-custom-expression-building-for-aspnet-pages.aspx'>&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2009/12/how-to-do-custom-expression-building-for-asp-net-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Screen Recording with Video</title>
		<link>http://www.frankwisniewski.net/2009/12/free-screen-recording-with-video/</link>
		<comments>http://www.frankwisniewski.net/2009/12/free-screen-recording-with-video/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 15:52:18 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/free-screen-recording-with-video.aspx</guid>
		<description><![CDATA[Looks good and is the right price, Free! http://camstudio.org/ Frank Wisniewski&#160;&#160;&#8230;]]></description>
			<content:encoded><![CDATA[<p>Looks good and is the right price, Free!</p>
<p><a title='http://camstudio.org/' href='http://camstudio.org/'>http://camstudio.org/</a></p>
<p><a href='http://www.frankwisniewski.net'>Frank Wisniewski</a>&nbsp;&nbsp;<a href='http://www.frankwisniewski.net/free-screen-recording-with-video.aspx'>&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2009/12/free-screen-recording-with-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jquery Event Calendar</title>
		<link>http://www.frankwisniewski.net/2009/11/jquery-event-calendar/</link>
		<comments>http://www.frankwisniewski.net/2009/11/jquery-event-calendar/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 16:07:31 +0000</pubDate>
		<dc:creator>fpwadmin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.frankwisniewski.net/jquery-event-calendar.aspx</guid>
		<description><![CDATA[For rescue assistant I was looking for options to provide a scheduling calendar and this is what I found, looks very promising. &#160; http://arshaw.com/fullcalendar/ Frank Wisniewski&#160;&#160;&#8230;]]></description>
			<content:encoded><![CDATA[<p>For rescue assistant I was looking for options to provide a scheduling calendar and this is what I found, looks very promising.</p>
<p>&#160;</p>
<p><a title='http://arshaw.com/fullcalendar/' href='http://arshaw.com/fullcalendar/'>http://arshaw.com/fullcalendar/</a></p>
<p><a href='http://www.frankwisniewski.net'>Frank Wisniewski</a>&nbsp;&nbsp;<a href='http://www.frankwisniewski.net/jquery-event-calendar.aspx'>&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankwisniewski.net/2009/11/jquery-event-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

