<?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>Eric Fickes &#187; asp.net</title>
	<atom:link href="http://ericfickes.com/tag/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericfickes.com</link>
	<description>Design minded Internet Programmer</description>
	<lastBuildDate>Fri, 28 Oct 2011 04:14:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Injecting javascript into asp.net via code</title>
		<link>http://ericfickes.com/2011/02/injecting-javascript-into-asp-net-via-code/</link>
		<comments>http://ericfickes.com/2011/02/injecting-javascript-into-asp-net-via-code/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 04:13:50 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[aspx]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[Literal]]></category>
		<category><![CDATA[msdn]]></category>
		<category><![CDATA[postback]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1903</guid>
		<description><![CDATA[Microsoft has a great MSDN article on using javascript along asp.net, but they didn&#8217;t mention a technique I like to use, put it in a Literal control.  While there are many ways to add javascript to a page, I find &#8230; <a href="http://ericfickes.com/2011/02/injecting-javascript-into-asp-net-via-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Microsoft has a great MSDN article on <a title="Several other techniques for using javascript with asp.net" href="http://msdn.microsoft.com/en-us/library/aa479011.aspx" target="_blank">using javascript along asp.net</a>, but they didn&#8217;t mention a technique I like to use, put it in a <a title="ASP.NET Literal Class" href="http://msdn.microsoft.com/en-us/library/f0aw4d5w.aspx" target="_blank">Literal</a> control.  While there are many ways to add javascript to a page, I find putting the javascript in a literal much less stressful.  Using a Literal control placeholder is also a good way to add messaging to a page after postback, but we&#8217;re just going to look at adding javascript.</p>
<p>Let&#8217;s take a simple example.  Say you&#8217;ve got a comment form that you want to auto close, or reload after the form was posted.  Below is a simple single file style asp.net page with a simple javascript function that reloads this page.</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;%@ Page Language=&quot;C#&quot; %&gt;

&lt;script runat=&quot;server&quot;&gt;
/// &lt;summary&gt;
/// &lt;/summary&gt;
/// &lt;param name=&quot;sender&quot;&gt;&lt;/param&gt;
/// &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {

    }
}

///////////////////////////////////////////////////////////////////////////////
/// Do stuff with the form data, then refresh page using javascript
protected void submitComments(object sender, EventArgs e)
{

    try
    {
	//
	// do stuff here
	//

	// set javascript timer to reload page afer 3 seconds
	js_target.Text = &quot;setTimeout('reload()', 3000);&quot;;

    }
    catch (Exception exc)
    {
        Response.Write( &quot;ERROR : &quot; + exc.Message );
    }
}
&lt;/script&gt;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head&gt;
	&lt;title&gt;Comments&lt;/title&gt;
	&lt;script type=&quot;text/javascript&quot;&gt;
	// page reload helper
	function reload() {
		document.location.replace( document.location );
	}
	&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;form id=&quot;form1&quot; runat=&quot;server&quot; method=&quot;post&quot;&gt;

&lt;script type=&quot;text/javascript&quot;&gt;&lt;asp:Literal runat=&quot;server&quot; id=&quot;js_target&quot; /&gt;&lt;/script&gt;

	Comments
	&lt;asp:TextBox runat=&quot;server&quot; ID=&quot;comment_box&quot; Width=&quot;200&quot; /&gt;
	&lt;br&gt;&lt;br&gt;

	Your name
	&lt;asp:TextBox runat=&quot;server&quot; ID=&quot;fullname&quot; Width=&quot;200&quot; /&gt;
	&lt;br&gt;&lt;br&gt;
	&lt;asp:Button runat=&quot;server&quot; ID=&quot;submit_btn&quot; onclick=&quot;submitComment&quot; Text=&quot;submit&quot; /&gt;

&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>If you look just under the form tag you&#8217;ll see the key to this technique, an asp literal wrapped by an open and close script tag.</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;&lt;asp:Literal runat=&quot;server&quot; id=&quot;js_target&quot; /&gt;&lt;/script&gt;
</pre>
<p>When you load your page and view the source you&#8217;ll just see an empty script tag, so it shouldn&#8217;t interfere with the execution or rendering of your page.</p>
<p>The last part of this technique is simple, in your server code just set your Literal control&#8217;s .Text value to your javascript code.  In this case when I post my comment form, after handling the input data I display a thank you message, then set some javascript to reload the page.</p>
<pre class="brush: csharp; title: ; notranslate">
ltl_js.Text = &quot;setTimeout('reload()', 3000);&quot;;
</pre>
<p>That&#8217;s all there is to it.  Drop a literal in an empty script block and BAM!, you have an easy way to add javascript to your asp.net page.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2011/02/injecting-javascript-into-asp-net-via-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Endless Mural wins FWA site of the day</title>
		<link>http://ericfickes.com/2010/11/endless-mural-wins-fwa-site-of-the-day/</link>
		<comments>http://ericfickes.com/2010/11/endless-mural-wins-fwa-site-of-the-day/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 06:55:25 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[beauty of the web]]></category>
		<category><![CDATA[branden hall]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[endlessmural]]></category>
		<category><![CDATA[FixDBLib]]></category>
		<category><![CDATA[generative art]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[joshua davis]]></category>
		<category><![CDATA[okapi]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1750</guid>
		<description><![CDATA[I&#8217;m ecstatic to announce the Endless Mural HTML5 project has won the prestigious FWA Site of the day award.  While this isn&#8217;t the first project I&#8217;ve worked on that has won the FWA, it is the first NON-Flash, HTML5 and &#8230; <a href="http://ericfickes.com/2010/11/endless-mural-wins-fwa-site-of-the-day/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_1822" class="wp-caption aligncenter" style="width: 610px"><a title="Endless Mural wins FWA SOTD, and we didn't even use Flash!" href="http://www.thefwa.com/site/the-endless-mural" target="_blank"><img class="size-full wp-image-1822 " style="border: 0px initial initial;" title="Endless Mural &gt; FWA site of the day" src="http://ericfickes.com/wp-content/uploads/2010/11/endlessmural-fwa.png" alt="FWA Site of the day &gt; Nov 22 2010" width="600" height="395" /></a><p class="wp-caption-text">Endless Mural wins FWA for HTML5</p></div>
<p>I&#8217;m ecstatic to announce the Endless Mural HTML5 project has won the prestigious <a title="Endless Mural wins the FWA Site of the day award" href="http://www.thefwa.com/site/the-endless-mural" target="_blank">FWA Site of the day award</a>.  While this isn&#8217;t the first project I&#8217;ve worked on that has <a title="Wiretree.com has kicked out a handful of FWAs.  Because they're that good" href="http://thefwa.com/profile/wiretree" target="_blank">won the FWA</a>, it is the first NON-Flash, HTML5 and ASP.NET project that has.  No Flash, and we still got the FWA site of the day, SWEET!.</p>
<h1>I need a SQL Ninja</h1>
<div>
<p>On Friday July 23rd I got the chance to skateboard with my good buddy and personal hero <a title="Joshua Davis Studios" href="http://joshuadavis.com" target="_blank">Joshua Davis</a>.  I feel lucky being able to say we&#8217;ve actually been skating together for a few years now, but this was certainly my favorite session we&#8217;ve had so far.  We started out at <a title="Broomfield Skatepark pictures on sk8colorado.blogspot.com" href="http://sk8colorado.blogspot.com/2010/07/broomfield-skatepark.html" target="_blank">Broomfield&#8217;s new park</a> because I had to show Josh the new mini bowl.</p>
<div id="attachment_1762" class="wp-caption aligncenter" style="width: 235px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/josh-eric-skate-checkin.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1762" title="Joshua Davis and Eric Fickes" src="http://ericfickes.com/wp-content/uploads/2010/11/josh-eric-skate-checkin-225x300.jpg" alt="skate or fry" width="225" height="300" /></a><p class="wp-caption-text">Two hot dogs ( http://yfrog.com/n3hs5j )</p></div>
<p>After Broomfield we made a quick stop for lunch, and then on to the Denver Skatepark in downtown.  It was great showing Josh the lines at my hometown skateparks, as well as a few radical maneuvers.</p>
<p>Now that Josh had seen my non-frontside airs, it was time to wrap things up.  As we were saying our goodbyes I decided to ask about work.  Normally I don&#8217;t talk about work at the skatepark, but I was thinking about going indie again, and figured what the heck.</p>
<p>Turns out Josh was about to start a project for <a title="Endless Mural &gt; Part of the IE9 launch project 'Beauty of the Web'" href="http://www.beautyoftheweb.com" target="_blank">Microsoft</a> ( WHAT?!?! ) and he need to &#8220;find a SQL Ninja&#8221; ( DOUBLE WHAT?!?! ).  I&#8217;ve been actively working with MS SQL Server since version 6.5, so I let him know he was looking at his sql ninja.  Josh was interested, but gave me the &#8220;just cause we&#8217;re bros, doesn&#8217;t put you on the team&#8221;.</p>
<h1>HTML5 drawing tool in one night</h1>
<p>Driving home from the skatepark I called my wife super giddy.  &#8221;Honey, I may be going indie sooner than we planned&#8221;.  I gave her the rundown of the potential project Josh and I just spoke about, and let her know I had some homework to do.  That night I went home and built out a distant cousin of the endless mural project.</p>
<div style="clear: both;">
<div id="attachment_1781" class="wp-caption alignleft" style="width: 243px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/efdraw-html5.png" rel="lightbox[1750]"><img class="size-medium wp-image-1781" title="EFDRAW" src="http://ericfickes.com/wp-content/uploads/2010/11/efdraw-html5-233x300.png" alt="You can draw with HTML5" width="233" height="300" /></a><p class="wp-caption-text">HTML5 drawing tool powered by ASPX and MySQL</p></div>
<div id="attachment_1782" class="wp-caption alignright" style="width: 244px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/efdraw-skull.png" rel="lightbox[1750]"><img class="size-medium wp-image-1782" title="draw save and share" src="http://ericfickes.com/wp-content/uploads/2010/11/efdraw-skull-234x300.png" alt="sloppy html5 drawing" width="234" height="300" /></a><p class="wp-caption-text">HTML5 drawing tool powered by ASPX and MySQL</p></div>
</div>
</div>
<p><a title="I built an HTML5 drawing tool overnight" href="http://fickii.com/efdraw/" target="_blank">EFDRAW</a> is a really simple HTML5 drawing tool powered by ASP.NET and MySQL.  It has most of the features of the mural ( draw, save, replay, share ), but this was only a proof of concept.  This was my first dive into HTML5 development, and it&#8217;s pretty sweet.</p>
<p><object id="stU0hSREFIR1FfQFVcU1tYV1dV" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.screentoaster.com/swf/STPlayer.swf" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="video=stU0hSREFIR1FfQFVcU1tYV1dV" /><param name="src" value="http://www.screentoaster.com/swf/STPlayer.swf" /><param name="allowfullscreen" value="true" /><embed id="stU0hSREFIR1FfQFVcU1tYV1dV" type="application/x-shockwave-flash" width="425" height="344" src="http://www.screentoaster.com/swf/STPlayer.swf" flashvars="video=stU0hSREFIR1FfQFVcU1tYV1dV" allowscriptaccess="always" allowfullscreen="true" data="http://www.screentoaster.com/swf/STPlayer.swf"></embed></object></p>
<p>If you&#8217;re interested in HTML5 drawing tools, feel free to play around with <a title="I bult an HTML5 drawing tool overnight" href="http://fickii.com/efdraw/" target="_blank">EFDRAW</a>, view source, help yourself.</p>
<h1>There&#8217;s one thing&#8230;. Azure</h1>
<p>A few days after building EFDRAW my band <a href="http://twitter.com/#!/thecompilers/status/20575513102" target="_blank">The Compilers</a> played at Ignite Denver 7.  Right before starting our first set my phone rings and it&#8217;s Josh!  OMG I think, this is either the &#8220;you got it&#8221; or the &#8220;sorry bud, we&#8217;ll skate again&#8221; call.  I decide to take the call even though we were locked and loaded, standing on stage with our gear waiting for the house music to go down.  I answer and it&#8217;s Josh, but not the usual hyperactive Josh I&#8217;m accustomed to.  I ask about the gig and he says &#8220;Well, there&#8217;s one thing.  We have to use Azure&#8221;.</p>
<p>I let him know I&#8217;ve worked with other cloud platforms already, just not Microsoft&#8217;s.  So we talk a little more and Josh passes the phone to Branden so we can talk 0s and 1s.  After talking to Branden &#8220;mega brain&#8221; Hall for a few minutes he asks if I can do this.  I tell him yes, he says yes, I get excited, he gets excited.  Branden passed me back to Josh and I&#8217;m in shock at this point.</p>
<h1>Now the boring stuff</h1>
<p>So that&#8217;s the story of how I landed the Endless Mural gig, now the boring technical details.</p>
<p>The drawing portion of the mural was built by <a title="Branden Hall's personal website" href="http://waxpraxis.org" target="_blank">Branden Hall</a> of <a title="Automata Studios :: Branden Hall's software company" href="http://automatastudios.com" target="_blank">Automata Studios</a>.  I did the backend which is made up of ASP.NET ( C# ), SQL Azure, and Windows Azure.  We&#8217;re using Azure blob storage to save and serve up the PNGs created at the mural.  To access SQL server, I wrote a super lightweight data access library using all native .NET.</p>
<p>For the most part the backend was very much like every other .NET SQL Server project I build, but Azure did introduce a few gotchas.</p>
<ol>
<li>The publishing and management of your cloud site mainly goes through <a title="Windows Azure control panel" href="http://windows.azure.com/" target="_blank">http://windows.azure.com/</a>.</li>
<li>You can deploy your site from Visual Studio which proved to be immensely helpful after my Azure deploy package grew beyond 100 MB.</li>
<li>You can access SQL Azure directly from SQL 2008+ management tools.</li>
<li>You can not FTP single files up to the cloud, only the full ball of wax.</li>
<li>You can still use web.config for configuration storage, but Azure also has it&#8217;s own version of web.config.</li>
<li>If you need to edit your settings after deploying, store those settings in your Azure service config, not web.config</li>
<li>SQL Azure requires all tables to use clustered indexes</li>
<li>SQL Azure has it&#8217;s own TSQL restrictions ( not many, but be aware )</li>
<li>On average, doing a full republish of an Azure site took a full hour.</li>
</ol>
<p>I could probably ramble on and on about Azure, but I&#8217;ll cut it short.  If you happen to have any questions about Azure feel free to hit me up or leave a comment.  I would also like to say that I <em>know</em> Microsoft is and has been actively improving Azure by the day.  The state of Azure today is most likely even better than when we built the mural, so my experiences may not be your own.</p>
<h1 style="font-family: Georgia, 'Bitstream Charter', serif; color: #000000; line-height: 1.5em; font-size: 2.4em; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; font-weight: normal;">The toolbox</h1>
<ul>
<li>Windows Azure SDK</li>
<li>Windows Azure Platform Kit June 2010</li>
<li>Windows Azure Tools for Visual Studio ( v1.2 )</li>
<li>Microsoft Seadragon Ajax library</li>
<li>Microsoft SQL Server 2008 R2</li>
<li>Microsoft SQL Azure</li>
<li>ASP.NET 4 ( C# )</li>
<li>Windows Azure</li>
<li>Azure Storage Explorer</li>
</ul>
<p>Here is the <a title="The Endless Mural toolbox" href="http://automatastudios.com/the-endless-mural-toolbox/" target="_blank">toolbox that Branden used on the client side</a>.</p>
<h1>Hotlinks from the server guy</h1>
<ul>
<li><a title="Developoing and Deploying with SQL Azure" href="http://social.technet.microsoft.com/wiki/contents/articles/developing-and-deploying-with-sql-azure.aspx" target="_blank">Developing and Deploying with SQL Azure</a></li>
<li><a title="SQL Azure T-SQL reference" href="http://msdn.microsoft.com/en-us/library/ee336281.aspx" target="_blank">SQL Azure DB T-SQL reference</a></li>
<li><a title="Azure w/Intellitrace" href="http://blogs.msdn.com/b/jnak/archive/2010/06/07/using-intellitrace-to-debug-windows-azure-cloud-services.aspx" target="_blank">Azure w/Intellitrace</a></li>
<li><a title="How to upload download Page Blobs ( Windows Azure )" href="http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/11/using-windows-azure-page-blobs-and-how-to-efficiently-upload-and-download-page-blobs.aspx" target="_blank">Using Windows Azure Page Blobs .. how to upload / download blobs</a></li>
<li><a title="Azure Deep Dive : Working with configuration" href="http://azure.snagy.name/blog/?p=176" target="_blank">Windows Azure Deep Dive: Working with Configuration</a></li>
<li><a title="Getting started with Seadragon AJAX" href="http://www.seadragon.com/developer/ajax/getting-started/" target="_blank">Seadragon Ajax &#8211; Getting Started</a></li>
<li><a title="Creating Deep Zoom content" href="http://www.silverlight.net/learn/whitepapers/deep-zoom-tools/" target="_blank">Creating Content : Deep Zoom Tools</a></li>
<li><a title="Deep Zoom Blog" href="http://blogs.msdn.com/b/lutzg/" target="_blank">Deep Zoom Blog</a></li>
<li><a title="How to create a Twitter TWEET button" href="http://dev.twitter.com/pages/tweet_button" target="_blank">Twitter TWEET Button</a></li>
</ul>
<h1>It&#8217;s a wrap</h1>
<p>This project was the most concentrated five weeks I&#8217;ve had in quite some time.  I still wonder if we were only given five weeks because this was an HTML5 project.  Either way, the mural team made some magic and now you can too.  If you&#8217;re like me and just want to doodle, <a href="http://endlessmural.com/" target="_blank">go make some art at the mural</a>.  If you&#8217;re a developer interested in HTML5 and Javascript programming, go check out <a title="OKAPI.js, the javascript behind endlessmural.com" href="http://www.okapijs.org/" target="_blank">the javascript library okapi.js</a> which Branden Hall recently open sourced.</p>
<p>Also be sure to visit the magicians, I mean artists, who made the amazing patterns you see when using the mural.  I&#8217;m a life long doodler, but can&#8217;t art myself out of a paper bag.</p>
<div>
<h2 style="text-align: center;"><a title="Evgeny Kiselev" href="http://www.ekiselev.com" target="_blank">Evgeny Kiselev</a></h2>
<div id="attachment_1839" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/evgeny-kiselev.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1839 " title="evgeny-kiselev" src="http://ericfickes.com/wp-content/uploads/2010/11/evgeny-kiselev-300x158.jpg" alt="Evgeny Kiselev - www.ekiselev.com" width="300" height="158" /></a><p class="wp-caption-text">Evgeny Kiselev - www.ekiselev.com</p></div>
</div>
<div>
<h2 style="text-align: center;"><a title="Guilherme Marconi" href="http://brain.marconi.nu" target="_blank">Guilherme Marconi</a></h2>
<div id="attachment_1840" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/guilherme-marconi.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1840" title="guilherme-marconi" src="http://ericfickes.com/wp-content/uploads/2010/11/guilherme-marconi-300x168.jpg" alt="Guilherme Marconi - brain.marconi.nu" width="300" height="168" /></a><p class="wp-caption-text">Guilherme Marconi - brain.marconi.nu</p></div>
</div>
<div>
<h2 style="text-align: center;"><a title="Joshua Davis" href="http://www.joshuadavis.com" target="_blank">Joshua Davis</a></h2>
<div id="attachment_1841" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/joshua-davis.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1841" title="joshua-davis" src="http://ericfickes.com/wp-content/uploads/2010/11/joshua-davis-300x225.jpg" alt="Joshua Davis - www.joshuadavis.com" width="300" height="225" /></a><p class="wp-caption-text">Joshua Davis - www.joshuadavis.com</p></div>
</div>
<div>
<h2 style="text-align: center;"><a title="Matt Lyon" href="http://www.c8six.com" target="_blank">Matt Lyon</a></h2>
<div id="attachment_1842" class="wp-caption aligncenter" style="width: 287px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/matt-lyon.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1842" title="matt-lyon" src="http://ericfickes.com/wp-content/uploads/2010/11/matt-lyon-277x300.jpg" alt="Matt Lyon - www.c8six.com" width="277" height="300" /></a><p class="wp-caption-text">Matt Lyon - www.c8six.com</p></div>
<p>And lastly I put up a photo album on Facebook of all my camera phone pictures from the trip.  <a title="camera phone pictures from my trip to SF to launch endlessmural.com" href="http://www.facebook.com/album.php?aid=220650&amp;id=500552652&amp;l=fe921f2bc4" target="_blank">Check out the endlessmural photo album</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/11/endless-mural-wins-fwa-site-of-the-day/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Want to see some kick ass HTML5?</title>
		<link>http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/</link>
		<comments>http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 02:22:45 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[automata studios]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[beauty of the web]]></category>
		<category><![CDATA[branden hall]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[joshua davis]]></category>
		<category><![CDATA[sql azure]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1654</guid>
		<description><![CDATA[I&#8217;m extremely happy to announce the www.endlessmural.com project was launched today and it was a huge success.  I intend on posting something with more details when I return home, but in the meantime please please check this site out.  It&#8217;s &#8230; <a href="http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m extremely happy to announce the <a href="http://www.endlessmural.com">www.endlessmural.com</a> project was launched today and it was a huge success.  I intend on posting something with more details when I return home, but in the meantime please please check this site out.  It&#8217;s my current favorite example of HTML5 in action, and it works in all modern browsers ( yes, even iPad ).</p>
<div id="attachment_1655" class="wp-caption aligncenter" style="width: 591px"><a href="http://www.endlessmural.com/"><img class="size-full wp-image-1655" title="endlessmural.com" src="http://ericfickes.com/wp-content/uploads/2010/09/endlessmural-dot-com.png" alt="The coolest HTML5 sample you will see on the internet" width="581" height="644" /></a><p class="wp-caption-text">Go make art at endlessmural.com</p></div>
<p>Endlessmural.com is a generative drawing tool written in HTML5, Javascript, CSS3, on top of a Microsoft Azure backend.  Go, make art, share the url.</p>
<p>Here is a piece I made today.</p>
<p><a href="http://www.endlessmural.com/#590"><img class="aligncenter size-medium wp-image-1656" title="You can make art at endlessmural.com" src="http://ericfickes.com/wp-content/uploads/2010/09/endlessmural-dot-com-image590-300x216.png" alt="endlessmural.com artwork" width="300" height="216" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DataBind a List of custom classes to an ASP:ListBox control</title>
		<link>http://ericfickes.com/2010/04/databind-a-list-of-custom-classes-to-an-asplistbox-control/</link>
		<comments>http://ericfickes.com/2010/04/databind-a-list-of-custom-classes-to-an-asplistbox-control/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 20:09:16 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[.NET framework]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[auto-implemented]]></category>
		<category><![CDATA[auto-implemented-properties]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[custom class]]></category>
		<category><![CDATA[DataBind]]></category>
		<category><![CDATA[DataSource]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[VO]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1415</guid>
		<description><![CDATA[Recently I was scratching my head at this error from the .NET Framework DataBinding: &#8216;MyApp.vo.customVO&#8217; does not contain a property with the name &#8216;Name&#8217; I was stumped because my custom VO class did in fact have a public property called &#8230; <a href="http://ericfickes.com/2010/04/databind-a-list-of-custom-classes-to-an-asplistbox-control/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I was scratching my head at this error from the .NET Framework</p>
<blockquote>
<h3><em><em>DataBinding: &#8216;MyApp.vo.customVO&#8217; does not contain a property with the name &#8216;Name&#8217;</em></em></h3>
</blockquote>
<p>I was stumped because my custom VO class did in fact have a public property called Name.  After many trials and tribulations I figured out that .NET didn&#8217;t like how I structured my custom class.</p>
<p>Here is what my original custom class looked like.</p>
<pre class="brush: csharp; title: ; notranslate">
namespace MyApp.vo
{
    public class customVO
    {
        public Int32 id  = 0;
        public DateTime time  = new DateTime();
        public string Name  = string.Empty;
        public string DeviceType  = string.Empty;
        public string ObjectIDs  = string.Empty;
    }
}
</pre>
<p>Luckily I have <a title="JetBrain's ReSharper is a must have for any .NET developer" href="http://www.jetbrains.com/resharper/" target="_blank">JetBrains ReSharper</a> installed, and it suggested using C#&#8217;s <a href="http://msdn.microsoft.com/en-us/library/bb384054.aspx" target="_blank">Auto-Implemented properties</a>.  This is the one thing I hadn&#8217;t thought about trying, and it ended up being the fix!  My new custom VO class now looks like this.</p>
<pre class="brush: csharp; title: ; notranslate">
namespace MyApp.vo
{
    public class customVO
    {
        public Int32 id { get; set; }
        public DateTime time { get; set; }
        public string DeviceType { get; set; }
        public string ObjectIDs { get; set; }
        public string Name { get; set; }
    }
}
</pre>
<p>So if you find yourself running into this error while trying to DataBind a collection of custom classes to a ListBox or similar control, have a look at your custom class and see if you can convert it over to using auto-implement properties as well.</p>
<p>Now I&#8217;m not suggesting this is the only way to DataBind a List of custom classes to a ListBox, but it solved my problem and let me do direct databinding from my service call without having to do any pre-processing on my list.</p>
<p>Hope this helps someone else.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/04/databind-a-list-of-custom-classes-to-an-asplistbox-control/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Coldfusion and ASP.NET coexisting on IIS, where&#8217;d WebResource.axd go?</title>
		<link>http://ericfickes.com/2010/02/coldfusion-and-asp-net-coexisting-on-iis-whered-webresource-axd-go/</link>
		<comments>http://ericfickes.com/2010/02/coldfusion-and-asp-net-coexisting-on-iis-whered-webresource-axd-go/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 19:33:39 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[iis7]]></category>
		<category><![CDATA[inetmgr]]></category>
		<category><![CDATA[web.config]]></category>
		<category><![CDATA[webresource.axd]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1109</guid>
		<description><![CDATA[My Monday morning WTF comes from IIS7 on Windows 7.  I recently installed Coldfusion9 on this machine which has a handful of existing ASP.NET 3.5 web applications.  The problem I ran into came after installing Coldfusion9 and electing to configure &#8230; <a href="http://ericfickes.com/2010/02/coldfusion-and-asp-net-coexisting-on-iis-whered-webresource-axd-go/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My Monday morning WTF comes from IIS7 on Windows 7.  I recently installed Coldfusion9 on this machine which has a handful of existing ASP.NET 3.5 web applications.  The problem I ran into came after installing Coldfusion9 and electing to configure all IIS websites to work with CF.  While that is convenient, it ended up breaking one of my ASP.NET applications that was using ASP Validation controls on a login form.  Now that things are figured out, here are the details.</p>
<p>Firing up my ASP.NET application gives me the error message :</p>
<p style="text-align: center;"><strong>The WebResource.axd handler must be registered in the configuration to process this request</strong></p>
<div id="attachment_1110" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/02/axd-handler-error.png" rel="lightbox[1109]"><img class="size-medium wp-image-1110" title="WebResource.axd handler must be registered" src="http://ericfickes.com/wp-content/uploads/2010/02/axd-handler-error-300x177.png" alt="Misleading web handler error message" width="300" height="177" /></a><p class="wp-caption-text">WebResource.axd handler must be registered</p></div>
<p>Obviously all I could think is WTF?!?!? since this application worked on Friday and now it is broken.  The first thing I want to point out is that in my situation, the suggested solution of mapping WebResource.axd in the httpHandlers section of my web.config did <em><strong>not</strong></em> help this problem.  After some googling I cam across <a title="Problems with ASP.NET 2.0 Applications with Validation Controls" href="http://forums.iis.net/p/1147595/1861983.aspx#1861983" target="_blank">this post on the IIS.NET forums</a> which put me on the right track.  You can read the details there if you want a good background on MS&#8217; response and other users running CF and ASP.NET on the same box.</p>
<p>I&#8217;m happy to say I have three workarounds for this issue.  Hopefully these will help you as well.</p>
<h3>1. Change your AppPool to run in Classic Mode</h3>
<ol>
<li>In inetmgr, put your web application into it&#8217;s own Application Pool ( unless it&#8217;s already in it&#8217;s own pool )</li>
<li>Change that AppPool&#8217;s Managed pipeline mode to &#8220;Classic&#8221;</li>
<li>You should be good to go</li>
</ol>
<div id="attachment_1111" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/02/change-apppool-2-classic.png" rel="lightbox[1109]"><img class="size-medium wp-image-1111" title="Edit Application Pool &gt; Managed Pipeline Mode" src="http://ericfickes.com/wp-content/uploads/2010/02/change-apppool-2-classic-300x266.png" alt="Change Managed Pipeline Mode to Classic" width="300" height="266" /></a><p class="wp-caption-text">Classic mode is for compatibility ( think IIS6 )</p></div>
<h3>2. Stop using ASP Validation controls</h3>
<p>All ASP.NET Validation controls are hosted by WebResource.axd.  If you stop using ASP Validator controls, the server will stop asking for WebResource.axd.</p>
<div id="attachment_1112" class="wp-caption aligncenter" style="width: 301px"><a href="http://ericfickes.com/wp-content/uploads/2010/02/stop-using-validators.png" rel="lightbox[1109]"><img class="size-medium wp-image-1112" title="Don't use ASP Validator controls" src="http://ericfickes.com/wp-content/uploads/2010/02/stop-using-validators-291x300.png" alt="Comment out ASP Validator controls" width="291" height="300" /></a><p class="wp-caption-text">Removing ASP Validator controls should remove this error</p></div>
<h3>3. Remove Coldfusion handler mappings from your ASP.NET site</h3>
<p>If your ASP.NET app isn&#8217;t using Coldfusion, I would suggest doing this as your solution.  Even if you do need Coldfusion in your ASP.NET app, you could still host your CF app in it&#8217;s own Virtual Directory and request if via ASP.NET.</p>
<ol>
<li>Open inetmgr</li>
<li>Select your web app on the left ( under Default Web Site )</li>
<li>In Features View on the right, double click Handler Mappings</li>
<li>Sort your Handler Mappings by Name, and remove all entries titled &#8220;AboMapperCustom-*&#8221;</li>
<li>Now your ASP.NET should work like a champ.</li>
</ol>
<div id="attachment_1113" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/02/inetmgr-handlerMappings.png" rel="lightbox[1109]"><img class="size-medium wp-image-1113" title="inetmgr Handler Mappings" src="http://ericfickes.com/wp-content/uploads/2010/02/inetmgr-handlerMappings-300x238.png" alt="IIS7 inetmgr Handler Mappings" width="300" height="238" /></a><p class="wp-caption-text">IIS7 Handler Mappings</p></div>
<div id="attachment_1114" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/02/remove-cf-mappings.png" rel="lightbox[1109]"><img class="size-medium wp-image-1114" title="Coldfusion9 Handler Mappings" src="http://ericfickes.com/wp-content/uploads/2010/02/remove-cf-mappings-300x242.png" alt="Coldfusion9 Handler Mappings" width="300" height="242" /></a><p class="wp-caption-text">Coldfusion9 Handler Mappings</p></div>
<p>Monday WTF solved.  Now to get back to pushing buttons.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/02/coldfusion-and-asp-net-coexisting-on-iis-whered-webresource-axd-go/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to JOIN two tables using LINQ to SQL</title>
		<link>http://ericfickes.com/2010/02/how-to-join-two-tables-using-linq-to-sql/</link>
		<comments>http://ericfickes.com/2010/02/how-to-join-two-tables-using-linq-to-sql/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 01:27:53 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[linq to sql]]></category>
		<category><![CDATA[linqtosql]]></category>
		<category><![CDATA[query]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1065</guid>
		<description><![CDATA[Wanted to share this since it gave me so much trouble figuring out.  It&#8217;s a simple SQL query ported to LINQ to SQL that joins two tables to return a filtered listed of data. Here are the tables from my &#8230; <a href="http://ericfickes.com/2010/02/how-to-join-two-tables-using-linq-to-sql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wanted to share this since it gave me so much trouble figuring out.  It&#8217;s a simple SQL query ported to LINQ to SQL that joins two tables to return a filtered listed of data.</p>
<p>Here are the tables from my schema<br />
<a href="http://ericfickes.com/wp-content/uploads/2010/02/user-user_videos-video.png" rel="lightbox[1065]"><img class="aligncenter size-full wp-image-1068" title="My three user tables" src="http://ericfickes.com/wp-content/uploads/2010/02/user-user_videos-video.png" alt="user, user_video, video tables" width="465" height="317" /></a></p>
<p>Here is a basic SQL statement I could fire to retrieve my user videos.</p>
<pre class="brush: sql; title: ; notranslate">
select  *
from    video v, user_videos uv
where   v.vid = uv.vid
and     uv.uid = 2
</pre>
<p><a href="http://ericfickes.com/wp-content/uploads/2010/02/uservideos-SQL.png" rel="lightbox[1065]"><img class="aligncenter size-full wp-image-1069" title="Data returned from this SQL statement" src="http://ericfickes.com/wp-content/uploads/2010/02/uservideos-SQL.png" alt="User 2 has two videos" width="499" height="220" /></a><br />
Here is how you would run the same query using .net&#8217;s LINQ to SQL.</p>
<pre class="brush: csharp; title: ; notranslate">
// create DB connection
var db = new DBCONN();
// run query
List&lt;video&gt; uvids = (
    from c in db.video
    join o in db.user_videos
    on c.vid equals o.vid
    where o.uid == 2
    select c
).ToList();
</pre>
<p>This query differs slightly from the screenshot below because I used it in a WCF Service.</p>
<p><a href="http://ericfickes.com/wp-content/uploads/2010/02/uservideos-LINQTOSQL.png" rel="lightbox[1065]"><img class="aligncenter size-full wp-image-1070" title="Same query run via LINQ to SQL" src="http://ericfickes.com/wp-content/uploads/2010/02/uservideos-LINQTOSQL.png" alt="Same data, different retrieval method" width="488" height="419" /></a></p>
<p>The variable DBCONN is my database connection that I established when mapping my DB.  If you are not familiar with how to set this up, use the Visual Studio&#8217;s &#8220;Add the ADO.NET Entity Data Model&#8221; wizard.  With your .net project open, right click your project, left click on &#8220;Add the ADO.NET Entity Data Model&#8221;.  This wizard will walk you through setting up everything you need to setup your DB model file ( edmx ), as well as setting up your database connection and saving it in web.config.</p>
<p>Jesse Liberty did a <a title="ADO.NET DataEntities and WCF Feeding a Silverlight DataGrid" href="http://silverlight.net/learn/tutorials/adonetdataentities-cs/" target="_blank">simple tutorial that uses this wizard in a WCF service application</a>.</p>
<p>I hope this helps somebody out.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/02/how-to-join-two-tables-using-linq-to-sql/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Create a delimited list of SortedList Keys in C#</title>
		<link>http://ericfickes.com/2009/02/create-a-delimited-list-of-sortedlist-keys-in-c/</link>
		<comments>http://ericfickes.com/2009/02/create-a-delimited-list-of-sortedlist-keys-in-c/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 22:39:53 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[implode]]></category>
		<category><![CDATA[SortedList]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=486</guid>
		<description><![CDATA[I love C#, but miss the simplicity of PHP sometimes.  Specifically when dealing with collections.  Recently I ran into a situation where PHP&#8217;s implode would have been perfect, but I wasn&#8217;t able to find any quick and easy built in &#8230; <a href="http://ericfickes.com/2009/02/create-a-delimited-list-of-sortedlist-keys-in-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I love C#, but miss the simplicity of PHP sometimes.  Specifically when dealing with collections.  Recently I ran into a situation where <a title="Read the docs on implode( glue, array_pieces )" href="http://php.net/implode" target="_blank">PHP&#8217;s implode</a> would have been perfect, but I wasn&#8217;t able to find any quick and easy built in solution.</p>
<p>I would like to be able to do this</p>
<pre class="brush: csharp; title: ; notranslate">
string id_list = implode( &quot;,&quot;, mySortedList.Keys );
</pre>
<p>I&#8217;m not aware of any built in ways to do this, so I wrote the following helper function.</p>
<pre class="brush: csharp; title: ; notranslate">
///
/// Pass in a SortedList and this will return a string containing a delimited
/// list of keys separated by delim
///
///

///

/// key1{DELIM}key2{DELIM}keyN
public static string SortedListKeysToDelimList(SortedList sl, string delim)
{
StringBuilder sb_keys = new StringBuilder();

foreach (DictionaryEntry dl in sl)
{
sb_keys.Append( dl.Key.ToString() );

// append DELIM only if we're NOT on the last entry
if (dl.Key != sl.GetKey(sl.Keys.Count - 1))
{
sb_keys.Append( delim );
}
}

return sb_keys.ToString();
}
</pre>
<p>If there is any better way to do this, please leave me a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2009/02/create-a-delimited-list-of-sortedlist-keys-in-c/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Send custom objects from Flash to ASP.NET web service ( asmx )</title>
		<link>http://ericfickes.com/2006/08/send-custom-objects-from-flash-to-aspnet-web-service-asmx/</link>
		<comments>http://ericfickes.com/2006/08/send-custom-objects-from-flash-to-aspnet-web-service-asmx/#comments</comments>
		<pubDate>Wed, 02 Aug 2006 22:03:00 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[flash platform]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[asmx]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[custom class]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash remoting]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://ericfickes.com/2006/08/02/80/</guid>
		<description><![CDATA[I came across a new server message today &#8211; &#8220;The test form is only available for methods with primitive types or arrays of primitive types as parameters&#8221; While working with flash and asp.net web services I learned that you can &#8230; <a href="http://ericfickes.com/2006/08/send-custom-objects-from-flash-to-aspnet-web-service-asmx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I came across a new server message today &#8211; &#8220;<span style="font-weight: bold;">The test form is only available for methods with primitive types or arrays of primitive types as parameters</span>&#8221;</p>
<p>While working with flash and asp.net web services I learned that you can send a custom class object to an ASMX.  That service can then take your object and have it&#8217;s way with it.  This is pretty killer because you can share custom classes between .net and as, assuming the class definitions match, and the datatypes don&#8217;t get too complex.</p>
<p>If you have to work with webservices from flash, checkout the WebService class.  It&#8217;s sweet.  So much so that I don&#8217;t understand why I even need Flash Remoting.  I mean, I can send and receive my custom class on the flash side as well as the .net side.</p>
<p>Currently I only see the following limitations with this magic flash to soap communicado.</p>
<ol>
<li>No test form on the .asmx page.  For a typical asmx file, the .net server can generate a simple test form that you can use to test your webservice.  It&#8217;s great, except for a service that expects your custom class as input</li>
<li>Simple data types.  I haven&#8217;t tested the waters of what datatypes you can use in your custom object, but I&#8217;m guessing you can&#8217;t venture outside of the basic strings and numbers.</li>
</ol>
<p>I&#8217;m pretty pumped about learning the AS WebService class.  It&#8217;s so much nicer than the olden days of parsing name value pairs, or even a full on xml object.  The WebService class does all the magic for you in flash, and you code up the result object as you&#8217;ve defined your custom object.</p>
<p>end of line</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2006/08/send-custom-objects-from-flash-to-aspnet-web-service-asmx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serialize an ASP.NET control into it&#8217;s html source code</title>
		<link>http://ericfickes.com/2006/05/serialize-an-aspnet-control-into-its-html-source-code/</link>
		<comments>http://ericfickes.com/2006/05/serialize-an-aspnet-control-into-its-html-source-code/#comments</comments>
		<pubDate>Wed, 03 May 2006 16:07:00 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[serialize]]></category>

		<guid isPermaLink="false">http://ericfickes.com/2006/05/03/72/</guid>
		<description><![CDATA[Here&#8217;s a handy little routine that takes an ASP.NET control and spits out the html source for use in code. I&#8217;ve used this with ASCX files, but I think it should work with any type of asp:control ( ascx, server &#8230; <a href="http://ericfickes.com/2006/05/serialize-an-aspnet-control-into-its-html-source-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: trebuchet ms;">Here&#8217;s a handy little routine that takes an ASP.NET control and spits out the html source for use in code.  I&#8217;ve used this with ASCX files, but I think it should work with any type of asp:control ( ascx, server control, html control, etc ).</span></p>
<pre class="brush: csharp; title: ; notranslate">
#region RenderToString
using System.IO;
using System.Text;
using System.Web.UI;

public string RenderToString(Control ctrl)
{
StringWriter stringWriter = new StringWriter();

HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);

ctrl.RenderControl(htmlWriter);

StringBuilder stringBuilder = stringWriter.GetStringBuilder();

return stringBuilder.ToString();
}

#endregion
</pre>
<p>This came in handy when I was working on a mass mailer app. Instead of hard coding my email message into my codebehind, I just made an ASCX control for each message, then loaded the correct message in my code, ran it through this routine, and sent it out.</p>
<p>By putting the message into an ASCX file, it makes formatting HTML much easier than putting it in C# code. If you&#8217;ve ever programmed any sort of emailer that sends an HTML message, you know what a pain this can be.</p>
<p>I would like to think there is an easier way to do an include file via code, populate the message with some variables, then send it out, but I haven&#8217;t found it yet.  If you know of an easier way, I want to hear about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2006/05/serialize-an-aspnet-control-into-its-html-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

