<?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>sides of march &#187; ASP.Net</title>
	<atom:link href="http://www.sidesofmarch.com/index.php/archive/tag/asp-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sidesofmarch.com</link>
	<description>Thoughts on life, liberty, and information technology</description>
	<lastBuildDate>Mon, 16 Jan 2012 02:43:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>CSS Friendly Control Adapters now available on NuGet</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2011/05/20/css-friendly-control-adapters-now-available-on-nuget/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2011/05/20/css-friendly-control-adapters-now-available-on-nuget/#comments</comments>
		<pubDate>Fri, 20 May 2011 23:32:56 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSSFriendly]]></category>
		<category><![CDATA[Web Forms]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/?p=538</guid>
		<description><![CDATA[<p>Back in the days of <a href="http://www.asp.net/web-forms">Web Forms</a>, there were server controls, and they generated rather CSS-unfriendly HTML. So, Microsoft got someone (<a href="http://www.groovybits.com/">Russ Helfand</a>) to write adapters that changed their rendering to be more CSS-friendly: the “<strong>CSS Friendly Control Adapters</strong>” were born.</p>
<p>A little less farther back, in 2007, I tried convincing some people at Microsoft to let the community continue development of these adapters, and they agreed. The <a href="http://cssfriendly.codeplex.com/">CSSFriendly CodePlex project</a> was born, and a bunch of bugs and some new features were added.</p>
<p>A lot has changed since then, but the adapters still have use today for people stuck on .Net 2.0 (they’re in the top 200 most downloaded CodePlex projects, and <a href="http://forums.asp.net/1018.aspx/1?CSS+Friendly+Control+Adapters">their forums still see activity</a>). To facilitate those who still use CSSFriendly, I’ve <a href="http://nuget.org/List/Packages/CSSFriendly">added the library package to NuGet</a>.</p>
<p><strong>How to use the CSSFriendly NuGet package</strong></p>
<p><a href="http://www.sidesofmarch.com/wp-content/uploads/cssfriendly-nuget-package1.png"></a>In four easy steps (three if you already have NuGet).</p>

First, you need Visual Studio 2010 and <a href="http://nuget.org/">NuGet</a>. (If you’re <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2011/05/20/css-friendly-control-adapters-now-available-on-nuget/">CSS Friendly Control Adapters now available on NuGet</a></span>]]></description>
			<content:encoded><![CDATA[<p>Back in the days of <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.asp.net%2Fweb-forms&sref=rss">Web Forms</a>, there were server controls, and they generated rather CSS-unfriendly HTML. So, Microsoft got someone (<a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.groovybits.com%2F&sref=rss">Russ Helfand</a>) to write adapters that changed their rendering to be more CSS-friendly: the “<strong>CSS Friendly Control Adapters</strong>” were born.</p>
<p>A little less farther back, in 2007, I tried convincing some people at Microsoft to let the community continue development of these adapters, and they agreed. The <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fcssfriendly.codeplex.com%2F&sref=rss">CSSFriendly CodePlex project</a> was born, and a bunch of bugs and some new features were added.</p>
<p>A lot has changed since then, but the adapters still have use today for people stuck on .Net 2.0 (they’re in the top 200 most downloaded CodePlex projects, and <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fforums.asp.net%2F1018.aspx%2F1%3FCSS%2BFriendly%2BControl%2BAdapters&sref=rss">their forums still see activity</a>). To facilitate those who still use CSSFriendly, I’ve <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fnuget.org%2FList%2FPackages%2FCSSFriendly&sref=rss">added the library package to NuGet</a>.</p>
<p><strong>How to use the CSSFriendly NuGet package</strong></p>
<p><a href="http://www.sidesofmarch.com/wp-content/uploads/cssfriendly-nuget-package1.png"><img style="background-image: none; margin: 0px 0px 16px 16px; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border: 0px;" title="cssfriendly-nuget-package" src="http://www.sidesofmarch.com/wp-content/uploads/cssfriendly-nuget-package_thumb1.png" border="0" alt="cssfriendly-nuget-package" width="433" height="218" align="right" /></a>In four easy steps (three if you already have NuGet).</p>
<ol>
<li>First, you need Visual Studio 2010 and <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fnuget.org%2F&sref=rss">NuGet</a>. (If you’re new to NuGet, <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fdocs.nuget.org%2F&sref=rss">read the getting started documentation</a>.)</li>
<li>Next, right-click the <strong>References</strong> folder and choose <strong>Add Library Package Reference</strong>.</li>
<li>In the Add Library Package Reference window, search for “cssfriendly.”</li>
<li>When you see the CSSFriendly package, click the Install button.</li>
</ol>
<p>After it installs, the following is added to your project:</p>
<ul>
<li>The CSSFriendly library reference</li>
<li>The CSSFriendlyAdapters.browser file in the App_Browsers folder</li>
</ul>
<p>At that point, you’re ready to go!</p>
<p>The full source of the CSSFriendly library is still available at CodePlex: <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fcssfriendly.codeplex.com&sref=rss">http://cssfriendly.codeplex.com</a>. Downloads there include sample code and walkthroughs.</p>
<p>Enjoy, and let me know if you have any issues!</p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=538&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2011/05/20/css-friendly-control-adapters-now-available-on-nuget/' addthis:title='CSS Friendly Control Adapters now available on NuGet ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2011/05/20/css-friendly-control-adapters-now-available-on-nuget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVC model validation with Castle Validator</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2010/11/16/mvc-model-validation-with-castle-validator/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2010/11/16/mvc-model-validation-with-castle-validator/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 03:20:49 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[castle]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/?p=467</guid>
		<description><![CDATA[<p>The ASP.Net MVC framework comes with <a href="http://www.asp.net/mvc/tutorials/validation-with-the-data-annotation-validators-cs">built-in model validation using the Data Annotation validators</a>. Unfortunately, the Data Annotations aren&#8217;t as robust as other validation libraries, such as the <a href="http://www.castleproject.org/activerecord/documentation/v1rc1/manual/validators.html">Castle Validators</a>.</p>
<p>Implementing a custom model validator (for <strong>server-side validation</strong> &#8212; client-side validation requires more than is covered in this post), you need to write an implementation of the ModelValidator and ModelValidatorProvider classes that support the Castle Validators.</p>
<p>An example of how to do this follows. Though it hasn&#8217;t been fully tested, it worked for a handful of situations I experimented with. Use this as a starting point for your own server-side model validator implementation.</p>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Castle.Components.Validator;

namespace ComputerSims.Baseball.Web.Infrastructure
{
/// &#60;summary&#62;
/// Implements a &#60;see cref=&#34;ModelValidator&#34;/&#62; for the Castle Validator library.
/// &#60;/summary&#62;
public class CastleModelValidator : ModelValidator
{
private readonly IValidatorRegistry _registry;

/// &#60;summary&#62;
/// Initializes a new instance of the &#60;see cref=&#34;CastleModelValidator&#34;/&#62; class.
/// &#60;/summary&#62;
/// &#60;param name=&#34;metadata&#34;&#62;The metadata.&#60;/param&#62;
/// &#60;param name=&#34;controllerContext&#34;&#62;The controller context.&#60;/param&#62;
/// &#60;param name=&#34;validator&#34;&#62;The validator.&#60;/param&#62;
public CastleModelValidator(ModelMetadata metadata, ControllerContext controllerContext, IValidatorRegistry registry)
: base(metadata, controllerContext)
{
_registry = registry;
}

/// &#60;summary&#62;
/// Validates <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2010/11/16/mvc-model-validation-with-castle-validator/">MVC model validation with Castle Validator</a></span>]]></description>
			<content:encoded><![CDATA[<p>The ASP.Net MVC framework comes with <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.asp.net%2Fmvc%2Ftutorials%2Fvalidation-with-the-data-annotation-validators-cs&sref=rss">built-in model validation using the Data Annotation validators</a>. Unfortunately, the Data Annotations aren&#8217;t as robust as other validation libraries, such as the <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.castleproject.org%2Factiverecord%2Fdocumentation%2Fv1rc1%2Fmanual%2Fvalidators.html&sref=rss">Castle Validators</a>.</p>
<p>Implementing a custom model validator (for <strong>server-side validation</strong> &#8212; client-side validation requires more than is covered in this post), you need to write an implementation of the ModelValidator and ModelValidatorProvider classes that support the Castle Validators.</p>
<p>An example of how to do this follows. Though it hasn&#8217;t been fully tested, it worked for a handful of situations I experimented with. Use this as a starting point for your own server-side model validator implementation.<span id="more-467"></span></p>
<pre class="brush: c#; ">

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Castle.Components.Validator;

namespace ComputerSims.Baseball.Web.Infrastructure
{
/// &lt;summary&gt;
/// Implements a &lt;see cref=&quot;ModelValidator&quot;/&gt; for the Castle Validator library.
/// &lt;/summary&gt;
public class CastleModelValidator : ModelValidator
{
private readonly IValidatorRegistry _registry;

/// &lt;summary&gt;
/// Initializes a new instance of the &lt;see cref=&quot;CastleModelValidator&quot;/&gt; class.
/// &lt;/summary&gt;
/// &lt;param name=&quot;metadata&quot;&gt;The metadata.&lt;/param&gt;
/// &lt;param name=&quot;controllerContext&quot;&gt;The controller context.&lt;/param&gt;
/// &lt;param name=&quot;validator&quot;&gt;The validator.&lt;/param&gt;
public CastleModelValidator(ModelMetadata metadata, ControllerContext controllerContext, IValidatorRegistry registry)
: base(metadata, controllerContext)
{
_registry = registry;
}

/// &lt;summary&gt;
/// Validates the object.
/// &lt;/summary&gt;
/// &lt;param name=&quot;container&quot;&gt;The container.&lt;/param&gt;
/// &lt;returns&gt;A list of validation results.&lt;/returns&gt;
public override IEnumerable&lt;modelvalidationresult&gt; Validate(object container)
{
if (Metadata.Model != null &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp; Metadata.PropertyName == null)
{
IValidatorRunner runner = new ValidatorRunner(_registry);

if (!runner.IsValid(Metadata.Model))
{
ErrorSummary errors = runner.GetErrorSummary(Metadata.Model);

foreach (string property in errors.InvalidProperties)
{
yield return new ModelValidationResult()
{
MemberName = property,
Message = errors.GetErrorsForProperty(property)[0]
};
}
}
}

yield break;
}
}

/// &lt;summary&gt;
/// Implements a &lt;see cref=&quot;ModelValidatorProvider&quot;/&gt; for the Castle Validator library.
/// &lt;/summary&gt;
public class CastleModelValidatorProvider : ModelValidatorProvider
{
private IValidatorRegistry _registry;

/// &lt;summary&gt;
/// Initializes a new instance of the &lt;see cref=&quot;CastleModelValidatorProvider&quot;/&gt; class.
/// &lt;/summary&gt;
/// &lt;param name=&quot;validator&quot;&gt;The validator.&lt;/param&gt;
public CastleModelValidatorProvider(IValidatorRegistry registry)
{
Guard.NotNull(registry, &quot;registry&quot;);

_registry = registry;
}

/// &lt;summary&gt;
/// Gets a list of validators.
/// &lt;/summary&gt;
/// &lt;param name=&quot;metadata&quot;&gt;The metadata.&lt;/param&gt;
/// &lt;param name=&quot;context&quot;&gt;The context.&lt;/param&gt;
/// &lt;returns&gt;A list of validators.&lt;/returns&gt;
public override IEnumerable&lt;modelvalidator&gt; GetValidators(ModelMetadata metadata, ControllerContext context)
{
if (metadata.Model != null &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp; metadata.PropertyName == null)
{
yield return new CastleModelValidator(metadata, context, _registry);
}
}
}
}
</pre>
<p>I hope this helps those using the Castle Validators with the ASP.Net MVC framework!</modelvalidator></modelvalidationresult></p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=467&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2010/11/16/mvc-model-validation-with-castle-validator/' addthis:title='MVC model validation with Castle Validator ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2010/11/16/mvc-model-validation-with-castle-validator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change a Visual Studio 2005 class project to a web project</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2007/12/03/how-to-change-a-visual-studio-2005-class-project-to-a-web-project/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2007/12/03/how-to-change-a-visual-studio-2005-class-project-to-a-web-project/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 20:52:20 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2007/12/03/how-to-change-a-visual-studio-2005-class-project-to-a-web-project/</guid>
		<description><![CDATA[<p>I tend to create new Visual Studio projects using the class library template, then make it into what I want. Sometimes, what I want is a web project. Through the project properties view, you can change a project between a class library, windows application, or console application with ease &#8212; but there&#8217;s no easy way to change to a web project.</p>
<p>Fortunately, there is an easy way to do it.</p>
<p>Open your VS2005 project file (ending in .csproj) in a text editor. Add a new line (shown below) to the first
, usually one of the first few lines in the file.</p>


&#38;lt;ProjectTypeGuids&#38;gt;{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}&#38;lt;/ProjectTypeGuids&#38;gt;

<p>Save the file and reopen your project. Viola! It&#8217;s a web project. But there is a bit more to do. Find each &#60;OutputPath&#62; line, and set remove the Debug or Release (or any other) folder, so it just reads as follows.</p>


&#38;lt;OutputPath&#38;gt;bin\&#38;lt;/OutputPath&#38;gt;


<a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2007/12/03/how-to-change-a-visual-studio-2005-class-project-to-a-web-project/">How to change a Visual Studio 2005 class project to a web project</a></span>]]></description>
			<content:encoded><![CDATA[<p>I tend to create new Visual Studio projects using the class library template, then make it into what I want. Sometimes, what I want is a web project. Through the project properties view, you can change a project between a class library, windows application, or console application with ease &#8212; but there&#8217;s no easy way to change to a web project.</p>
<p>Fortunately, there is an easy way to do it.</p>
<p>Open your VS2005 project file (ending in <code>.csproj</code>) in a text editor. Add a new line (shown below) to the first
<propertygroup>, usually one of the first few lines in the file.</p>
<pre class="brush: xml; ">

&amp;lt;ProjectTypeGuids&amp;gt;{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}&amp;lt;/ProjectTypeGuids&amp;gt;
</pre>
<p>Save the file and reopen your project. Viola! It&#8217;s a web project. But there is a bit more to do. Find each &lt;OutputPath&gt; line, and set remove the Debug or Release (or any other) folder, so it just reads as follows.</p>
<pre class="brush: xml; ">

&amp;lt;OutputPath&amp;gt;bin\&amp;lt;/OutputPath&amp;gt;
</pre>
</propertygroup>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=183&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2007/12/03/how-to-change-a-visual-studio-2005-class-project-to-a-web-project/' addthis:title='How to change a Visual Studio 2005 class project to a web project ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2007/12/03/how-to-change-a-visual-studio-2005-class-project-to-a-web-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebForms and alternatives: You can&#8217;t convince everyone</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2007/03/27/webforms-and-alternatives-you-cant-convince-everyone/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2007/03/27/webforms-and-alternatives-you-cant-convince-everyone/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 14:24:51 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://site366.mysite4now.com/compsims/sidesofmarch/index.php/archive/2007/03/27/webforms-and-alternatives-you-cant-convince-everyone/</guid>
		<description><![CDATA[<p>Since starting with <a href="http://www.castleproject.org/monorail">MonoRail</a> some months ago, I&#8217;ve joined the bandwagon <a href="http://www.sidesofmarch.com/index.php/archive/2007/03/23/yet-another-comparison-of-monorail-vs-webforms/">touting its benefits over Web Forms</a>. Part of my advocacy was to convince the developers who help me out with my online baseball game, <a href="http://www.csfbl.com/">CSFBL</a> (which will be rewritten using MonoRail).</p>
<p>In a discussion on our <a href="http://www.basecamphq.com/">BaseCamp</a> site, one of those developers, Rick, said this. (Emphasis added by me.)</p>
<blockquote>
<p>I finally got to spend some time with MonoRail on Friday at work&#8230; [T]he guy that sits next to me does dev work on a fairly complex ASP site&#8230; He’s just got tasked to add a whole new section of his site and he doesn’t want to do it in ASP and we both got tasked to start learning each others projects so that we can back each other up when one of us is out so we decided to give MonoRail a look. <em>He had spent all week just trying to get up to speed on ASP.Net</em> and <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2007/03/27/webforms-and-alternatives-you-cant-convince-everyone/">WebForms and alternatives: You can&#8217;t convince everyone</a></span>]]></description>
			<content:encoded><![CDATA[<p>Since starting with <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.castleproject.org%2Fmonorail&sref=rss">MonoRail</a> some months ago, I&#8217;ve joined the bandwagon <a href="http://www.sidesofmarch.com/index.php/archive/2007/03/23/yet-another-comparison-of-monorail-vs-webforms/">touting its benefits over Web Forms</a>. Part of my advocacy was to convince the developers who help me out with my online baseball game, <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.csfbl.com%2F&sref=rss">CSFBL</a> (which will be rewritten using MonoRail).</p>
<p>In a discussion on our <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.basecamphq.com%2F&sref=rss">BaseCamp</a> site, one of those developers, Rick, said this. (Emphasis added by me.)</p>
<blockquote>
<p>I finally got to spend some time with MonoRail on Friday at work&#8230; [T]he guy that sits next to me does dev work on a fairly complex ASP site&#8230; He’s just got tasked to add a whole new section of his site and he doesn’t want to do it in ASP and we both got tasked to start learning each others projects so that we can back each other up when one of us is out so we decided to give MonoRail a look. <em>He had spent all week just trying to get up to speed on ASP.Net</em> and he was getting very frustrated… we spent about an hour going through the first tutorial before we both got interrupted to do other things, but we liked what we saw so far. We plan on picking up right where we left off first thing Monday morning.</p>
<p>I read your latest blog post about MonoRail vs ASP.Net and I’m one of those coming from the VB background that found Web Forms easy to learn. But after looking at all your links and the demos I can’t wait to learn this stuff. <em>You nailed it on the head at the end when you said you’d rather learn this than fight with the GridView… that’s the part of Web Forms that I hate. I can’t count the hours I’ve wasted on the old DataGrid in ASP.Net 1.1 and my coworker spent all week fighting with the Wizard and GridView controls.</em></p>
<p>Cool stuff. <img src='http://www.sidesofmarch.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
</blockquote>
<p>Cool stuff, indeed. Unfortunately, it&#8217;s not so easy to convince everyone. Here&#8217;s a follow-up reply he made. Again, emphasis added is mine.</p>
<blockquote>
<p>Not so fast…I chatted with my co-worker this morning and he made some great progress with the GridView over the weekend and was very excited about what he could do with it. <em>He said he’s not very excited about doing more Javascript and HTML coding and that he’d rather switch over to Web Forms</em>. DOH! So… tomorrow we’re going to check out the Web Client Factory Software.</p>
</blockquote>
<p>My reply went something like this.</p>
<blockquote>
<p>Are you a web developer or not? If you are, you should know JavaScript and HTML. Otherwise, you are not a web developer, you are a Web Forms developer. There&#8217;s a big difference. There&#8217;s nothing wrong with being either; you just have to understand the constraints of both.</p>
<p>As for doing more JavaScript as opposed to doing more Web Forms&#8230; Just wait until you start writing <code>OnItemDataBound</code> event handlers for your GridView to do some custom table rendering, as opposed to simple injection into your presentation layer (i.e. web page). You&#8217;ll realize that staying with Web Forms will just mean you write more C# code to handle your presentation instead of presentation code (i.e. HTML and JavaScript and whatever is used to inject data into your presentation layer).</p>
<p>The good thing about all of this is we have options: Web Forms, MonoRail, and many others. What&#8217;s better for one person (or one project) is not necessarily better for everyone (or all projects). People should try different solutions, and ultimately choose the one based on what are you most comfortable with and what makes you a better, more efficient developer.</p>
</blockquote>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=22&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2007/03/27/webforms-and-alternatives-you-cant-convince-everyone/' addthis:title='WebForms and alternatives: You can&#8217;t convince everyone ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2007/03/27/webforms-and-alternatives-you-cant-convince-everyone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yet another comparison of MonoRail vs WebForms</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2007/03/23/yet-another-comparison-of-monorail-vs-webforms/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2007/03/23/yet-another-comparison-of-monorail-vs-webforms/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 16:27:30 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://site366.mysite4now.com/compsims/sidesofmarch/index.php/archive/2007/03/23/yet-another-comparison-of-monorail-vs-webforms/</guid>
		<description><![CDATA[<p>It seems <a href="http://andrewpeters.wordpress.com/2007/03/20/aspnet-vs-monorail/">everyone</a> <a href="http://turtle.net.nz/blog/post/ThoughtsOnMonoRail">is</a> <a href="http://geekswithblogs.net/dsellers/archive/2006/10/25/95041.aspx">writing</a> <a href="http://www.kenegozi.com/blog/2006/10/26/MonoRailVsWebForms.aspx">about</a> <a href="http://hammett.castleproject.org/?p=131">the</a> <a href="http://ayende.com/Blog/archive/2007/03/20/MonoRail-Judged-By-Its-Views.aspx">differences</a> between <a href="http://www.castleproject.org/monorail">MonoRail</a> and WebForms these days. Not to be left out, I&#8217;ll throw a few of my own comments into the mix.</p>
<p>I think that one&#8217;s attraction (or hatred) of MonoRail or ASP.Net&#8217;s WebForms is based on their programming background. (At least, it is in my case, and that&#8217;s at least one person, so that statement can&#8217;t be totally wrong.)</p>

People who come from the old days of web programming (before ASP.Net), who are used to coding HTML and JavaScript by hand, or who are used and comfortable with injecting presentation code into web pages will feel comfortable with MonoRail.
People who come from the old days of Visual Basic programming or whose experience with web programming is WebForms and ASP.Net will feel comfortable with ASP.Net.

<p>For all its flaws, WebForms has a lot of power, but the power comes at a price. Web forms does a lot for you, <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2007/03/23/yet-another-comparison-of-monorail-vs-webforms/">Yet another comparison of MonoRail vs WebForms</a></span>]]></description>
			<content:encoded><![CDATA[<p>It seems <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fandrewpeters.wordpress.com%2F2007%2F03%2F20%2Faspnet-vs-monorail%2F&sref=rss">everyone</a> <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fturtle.net.nz%2Fblog%2Fpost%2FThoughtsOnMonoRail&sref=rss">is</a> <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fgeekswithblogs.net%2Fdsellers%2Farchive%2F2006%2F10%2F25%2F95041.aspx&sref=rss">writing</a> <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.kenegozi.com%2Fblog%2F2006%2F10%2F26%2FMonoRailVsWebForms.aspx&sref=rss">about</a> <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fhammett.castleproject.org%2F%3Fp%3D131&sref=rss">the</a> <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fayende.com%2FBlog%2Farchive%2F2007%2F03%2F20%2FMonoRail-Judged-By-Its-Views.aspx&sref=rss">differences</a> between <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.castleproject.org%2Fmonorail&sref=rss">MonoRail</a> and WebForms these days. Not to be left out, I&#8217;ll throw a few of my own comments into the mix.</p>
<p>I think that one&#8217;s attraction (or hatred) of MonoRail or ASP.Net&#8217;s WebForms is based on their programming background. (At least, it is in my case, and that&#8217;s at least one person, so that statement can&#8217;t be totally wrong.)</p>
<ul>
<li>People who come from the old days of web programming (before ASP.Net), who are used to coding HTML and JavaScript by hand, or who are used and comfortable with injecting presentation code into web pages will feel comfortable with MonoRail.</li>
<li>People who come from the old days of Visual Basic programming or whose experience with web programming is WebForms and ASP.Net will feel comfortable with ASP.Net.</li>
</ul>
<p>For all its flaws, WebForms has a lot of power, but the power comes at a price. Web forms does a lot for you, which is its benefit and its bane. If you want total control of your application, you&#8217;ll be frustrated with WebForms. MonoRail leaves a lot of things in your hands (particularly on the presentation side), and tries to <span style="font-style: italic;">help</span> you do things rather than do things for you. That&#8217;s a big difference.</p>
<p>One of the reasons for the popularity of ASP.Net and WebForms (aside from Microsoft, of course) are the many web controls that come built-in or that you can buy to extend your application&#8217;s capabilities without having to write your own complex code. The same issues described above, however, still apply. Whenever you rely on a web control to do a complex task for you, you&#8217;re sacrificing some control.</p>
<p>That&#8217;s not to say there are no &quot;web-control-like&quot; solutions for MonoRail. There are many community-developed scripts and code blocks that can be used to extend the functionality of a web site built on MonoRail, providing features similar to web controls with less mysterious baggage. Consider the following.</p>
<p><span id="more-24"></span></p>
<ul>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.prototypejs.org%2F&sref=rss">Prototype</a>, <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fscript.aculo.us%2F&sref=rss">script.aculo.us</a> and <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.bennolan.com%2Fbehaviour%2F&sref=rss">Behaviour</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.millstream.com.au%2Fview%2Fcode%2Ftablekit&sref=rss">TableKit</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Ftetlaw.id.au%2Fview%2Fjavascript%2Freally-easy-field-validation&sref=rss">Really Easy Field Validation</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.twinhelix.com%2Fdhtml%2Ffsmenu%2F&sref=rss">FreeStyle menus</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.twinhelix.com%2Fdhtml%2Fpopupmenu%2Fdemo%2F&sref=rss">Cascading popup menus</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fweb-graphics.com%2Fmtarchive%2F001717.php&sref=rss">Bubble tooltips</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fokonet.ru%2Fprojects%2Fmodalbox%2F&sref=rss">ModalBox</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.eulerian.com%2Fen%2Fopensource%2Fdatepicker-prototype-scriptaculous&sref=rss">DatePicker</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Flivepipe.net%2Fprojects%2Fcontrol_tabs%2F&sref=rss">Control.Tabs</a> or <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Ftetlaw.id.au%2Fview%2Fblog%2Ffabtabulous-simple-tabs-using-prototype%2F&sref=rss">Fatabulous</a></li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fsimon.incutio.com%2Fcode%2Fjs%2Fdate-parser%2F&sref=rss">Better date input</a></li>
</ul>
<p>I think you get the idea. All of the above are open source projects that would be difficult to use in a typical web forms project. Sure, with MonoRail you can&#8217;t use components from vendors like <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.componentart.com%2F&sref=rss">ComponentArt</a> (which are very good), but I think that&#8217;s more than an adequate trade-off. And, of course, any one of the tools above can provide the same power/control trade-off of a web control, but in my experience, it is not nearly on the level of a traditional ASP.Net control.</p>
<p>For all the time I&#8217;ve spent implementing things on MonoRail that seem &quot;out of the box&quot; in WebForms, it&#8217;s no worse than the time wasted trying to figure out why a GridView doesn&#8217;t do what I expect it to, or trying to get a GridView to provide markup that it simply can&#8217;t. And I&#8217;d rather spend time learning than time debugging any day. </p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=24&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2007/03/23/yet-another-comparison-of-monorail-vs-webforms/' addthis:title='Yet another comparison of MonoRail vs WebForms ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2007/03/23/yet-another-comparison-of-monorail-vs-webforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MonoRail vs Web Client Software Factory (WCSF)</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2007/03/15/monorail-vs-web-client-software-factory-wcsf/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2007/03/15/monorail-vs-web-client-software-factory-wcsf/#comments</comments>
		<pubDate>Thu, 15 Mar 2007 13:33:44 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2007/04/15/monorail-vs-web-client-software-factory-wcsf/</guid>
		<description><![CDATA[<p>There&#8217;s a little flurry of activity going around comparing <a href="http://www.castleproject.org/">Castle</a> <a href="http://www.castleproject.org/monorail">MonoRail</a> to the <a href="http://www.codeplex.com/websf">Web Client Software Factory (WCSF)</a>. Here&#8217;s a synopsis.</p>

<a href="http://codebetter.com/blogs/david.hayden/archive/2007/03/12/Web-Client-Software-Factory-_2D00_-MonoRail-_2D00_-Future-Deliverables-and-Directions_3F00_.aspx">David Hayden</a>, who admittedly is very familiar with WCSF and not very familiar with MonoRail, touts the future of WCSF and the concerns about the lack of resources working on MonoRail in order for it to compete long-term.
<a href="http://codebetter.com/blogs/scott.bellware/archive/2006/12/11/156223.aspx">Scott Bellware</a> talks about evaluating MonoRail for an enterprise application, and he mentions his horrible experience setting up and comprehending WCSF.
<a href="http://hammett.castleproject.org/?p=131">Hammett</a>, one of the key Castle Project people who admittedly is not familiar with WCSF, talks about the need for WCSF to compete with MonoRail, not the other way around.

<p>Where do I stand? Before answering, I need to explain my history with web development, ASP.Net, and MonoRail.</p>
<p>I started doing web development in the late 1990&#8242;s coding by hand and using <a href="http://en.wikipedia.org/wiki/ColdFusion">ColdFusion</a> on the server-side. I migrated to ASP and, ultimately, to ASP.Net, as most people did.</p>
<p>Since the <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2007/03/15/monorail-vs-web-client-software-factory-wcsf/">MonoRail vs Web Client Software Factory (WCSF)</a></span>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a little flurry of activity going around comparing <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.castleproject.org%2F&sref=rss">Castle</a> <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.castleproject.org%2Fmonorail&sref=rss">MonoRail</a> to the <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.codeplex.com%2Fwebsf&sref=rss">Web Client Software Factory (WCSF)</a>. Here&#8217;s a synopsis.</p>
<ul>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fcodebetter.com%2Fblogs%2Fdavid.hayden%2Farchive%2F2007%2F03%2F12%2FWeb-Client-Software-Factory-_2D00_-MonoRail-_2D00_-Future-Deliverables-and-Directions_3F00_.aspx&sref=rss">David Hayden</a>, who admittedly is very familiar with WCSF and not very familiar with MonoRail, touts the future of WCSF and the concerns about the lack of resources working on MonoRail in order for it to compete long-term.</li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fcodebetter.com%2Fblogs%2Fscott.bellware%2Farchive%2F2006%2F12%2F11%2F156223.aspx&sref=rss">Scott Bellware</a> talks about evaluating MonoRail for an enterprise application, and he mentions his horrible experience setting up and comprehending WCSF.</li>
<li><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fhammett.castleproject.org%2F%3Fp%3D131&sref=rss">Hammett</a>, one of the key Castle Project people who admittedly is not familiar with WCSF, talks about the need for WCSF to compete with MonoRail, not the other way around.</li>
</ul>
<p>Where do I stand? Before answering, I need to explain my history with web development, ASP.Net, and MonoRail.</p>
<p>I started doing web development in the late 1990&#8242;s coding by hand and using <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FColdFusion&sref=rss">ColdFusion</a> on the server-side. I migrated to ASP and, ultimately, to ASP.Net, as most people did.</p>
<p>Since the beginning, I&#8217;ve had a love/hate relationship with ASP.Net. I <span style="font-style: italic;">love</span> the .Net Framework, C#, and Visual Studio .Net. I <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fbbrown.info%2F2007%2F03%2F06%2Ffive-things-i-hate-about-c-sharp-and-asp-net.aspx&sref=rss"><span style="font-style: italic;">hate</span> ViewState</a>, complex web controls that do unpredictable things, and the difficulty injecting JavaScript into ASP.Net web pages (<span style="font-family: Courier New;" class="attribute-name">id</span><span style="font-family: Courier New;">=</span><span style="font-family: Courier New;">&quot;ctl00___ctl00___ctl00_ctl00_bhcr_t___TitleBarSearchText&quot;</span>, anyone?).</p>
<p><span class="attribute-value">When I stumbled across MonoRail some time in 2006, I liked what I read, but didn&#8217;t have the time to explore it further. Towards the middle of 2006 I was working on my own <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fmsdn.microsoft.com%2Fmsdnmag%2Fissues%2F06%2F08%2FDesignPatterns%2Fdefault.aspx&sref=rss">Model-View-Presenter</a> web architecture that was simple but effective, and even started transitioning my only claim to fame, <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.csfbl.com%2F&sref=rss">CSFBL</a>, to it. Then, I decided to give MonoRail a try.</span></p>
<p>I never turned back.</p>
<p><span id="more-29"></span></p>
<p>MonoRail is everything I wanted. It provides a simple yet powerful <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FModel-view-controller&sref=rss">Model-View-Controller</a> architecture. It avoids things like ViewState and bulky web controls. It&#8217;s a breeze marking up web pages and adding JavaScript to them. It allows me to work with the tools I like (such as my own model layer, <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.prototypejs.org%2F&sref=rss">Prototype</a>, and <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fscript.aculo.us%2F&sref=rss">Scriptaculous</a>) without getting in the way.</p>
<p>As for WCSF, my experience with it was similar to Scott Bellware&#8217;s &#8212; I was frightened by the weight of it from the start, and it didn&#8217;t alleviate my existing WebForms issues. It simply didn&#8217;t stack up to MonoRail&#8217;s powerful simplicity.</p>
<p>Having said that, how does MonoRail compete with WCSF? I think MonoRail&#8217;s &quot;weaknesses&quot; are its strengths. It doesn&#8217;t try to do everything; instead, it does enough things just right. It&#8217;s scalable and super-fast. It has a reasonably short learning curve, which is more impressive considering the fact that it is lacking in documentation in some areas.</p>
<p>Hayden&#8217;s comment that &quot;the MonoRail Project just does not have enough resources&quot; doesn&#8217;t pan out. MonoRail is already an excellent, stable framework, and it didn&#8217;t get that way because its resources were lacking. There&#8217;s a big difference between &quot;enough&quot; resources and &quot;not enough&quot; resources; more does not mean better in this case. Look at Prototype or Scriptaculous; both are among the most widely-accepted JavaScript libraries around, yet neither has the backing of huge development teams with billion-dollar corporations behind them.</p>
<p>I&#8217;m on the MonoRail bandwagon, and plan to be for a long time.</p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=29&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2007/03/15/monorail-vs-web-client-software-factory-wcsf/' addthis:title='MonoRail vs Web Client Software Factory (WCSF) ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2007/03/15/monorail-vs-web-client-software-factory-wcsf/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Microsoft OKs community development of CSS Friendly Control Adapters</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2007/03/07/microsoft-oks-community-development-of-css-friendly-control-adapters/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2007/03/07/microsoft-oks-community-development-of-css-friendly-control-adapters/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 18:11:59 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2007/03/07/microsoft-oks-community-development-of-css-friendly-control-adapters/</guid>
		<description><![CDATA[<p>Back in late 2006, I modified Microsoft&#8217;s <a href="http://www.asp.net/cssadapters">CSS Friendly ASP.Net 2.0 Control Adapters</a> to be distributable as a single DLL. Since that time, the code I wrote was <a href="http://demarzo.net/articles/1056.aspx">downloaded from this web site</a>, and everything seemed good, at least until the server crashed. After being prodded by a few people in the ASP.Net community, I moved this little project over to <a href="http://www.codeplex.com/cssfriendly">CodePlex</a>. Before doing so, I checked to make sure this was OK with <a href="http://www.scottgu.com/">Scott Guthrie</a>, the grand poohbah of ASP.Net at Microsoft. (You&#8217;ve got to cover your basis!)</p>
<p>Anyway, today I read a post on the ASP.Net forums stating that <a href="http://forums.asp.net/thread/1609779.aspx">Microsoft OKs community development of the CSS Friendly Control Adapters</a>. In short, this is a good thing for the users of this product, for reasons that are explained in that thread, and it looks like I&#8217;ll be more involved with the ongoing development of these adapters in the future. It&#8217;s also nice to see your efforts <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2007/03/07/microsoft-oks-community-development-of-css-friendly-control-adapters/">Microsoft OKs community development of CSS Friendly Control Adapters</a></span>]]></description>
			<content:encoded><![CDATA[<p>Back in late 2006, I modified Microsoft&#8217;s <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.asp.net%2Fcssadapters&sref=rss">CSS Friendly ASP.Net 2.0 Control Adapters</a> to be distributable as a single DLL. Since that time, the code I wrote was <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fdemarzo.net%2Farticles%2F1056.aspx&sref=rss">downloaded from this web site</a>, and everything seemed good, at least until the server crashed. After being prodded by a few people in the ASP.Net community, I moved this little project over to <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.codeplex.com%2Fcssfriendly&sref=rss">CodePlex</a>. Before doing so, I checked to make sure this was OK with <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.scottgu.com%2F&sref=rss">Scott Guthrie</a>, the grand poohbah of ASP.Net at Microsoft. (You&#8217;ve got to cover your basis!)</p>
<p>Anyway, today I read a post on the ASP.Net forums stating that <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fforums.asp.net%2Fthread%2F1609779.aspx&sref=rss">Microsoft OKs community development of the CSS Friendly Control Adapters</a>. In short, this is a good thing for the users of this product, for reasons that are explained in that thread, and it looks like I&#8217;ll be more involved with the ongoing development of these adapters in the future. It&#8217;s also nice to see your efforts noticed by the largest software development company in the world. <img src='http://www.sidesofmarch.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I will keep the pages on this site that mentioned these adapters, but I highly suggest everyone who used them to bookmark the <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.codeplex.com%2Fcssfriendly&sref=rss">CodePlex project &#8220;CSSFriendly&#8221;</a> and use that as their source of code and information going forward.</p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=38&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2007/03/07/microsoft-oks-community-development-of-css-friendly-control-adapters/' addthis:title='Microsoft OKs community development of CSS Friendly Control Adapters ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2007/03/07/microsoft-oks-community-development-of-css-friendly-control-adapters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiled version of ASP.Net CSSFriendly Control Adapters (RTM 1.0)</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2006/11/24/compiled-version-of-aspnet-cssfriendly-control-adapters-rtm-10/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2006/11/24/compiled-version-of-aspnet-cssfriendly-control-adapters-rtm-10/#comments</comments>
		<pubDate>Fri, 24 Nov 2006 14:06:02 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2006/11/24/compiled-version-of-aspnet-cssfriendly-control-adapters-rtm-10/</guid>
		<description><![CDATA[<p>Last week, I released a compiled version of Microsoft&#8217;s <a href="http://www.asp.net/CSSAdapters">CSSFriendly ASP.Net 2.0 Control Adapters</a> (&#8220;CSSFriendly&#8221;). Since that post, the &#8220;1.0&#8243; RTM version of the adapters were released. I just finished porting the latest release to a compiled assembly.</p>
<p>Instructions for installing and using the compiled adapters, and download links, can be found in <a href="http://www.sidesofmarch.com/index.php/projects/cssfriendly-the-css-friendly-control-adapters-for-aspnet/">the Projects section</a> of this web site.</p>
<a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2006/11/24/compiled-version-of-aspnet-cssfriendly-control-adapters-rtm-10/">Compiled version of ASP.Net CSSFriendly Control Adapters (RTM 1.0)</a></span>]]></description>
			<content:encoded><![CDATA[<p>Last week, I released a compiled version of Microsoft&#8217;s <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.asp.net%2FCSSAdapters&sref=rss">CSSFriendly ASP.Net 2.0 Control Adapters</a> (&#8220;CSSFriendly&#8221;). Since that post, the &#8220;1.0&#8243; RTM version of the adapters were released. I just finished porting the latest release to a compiled assembly.</p>
<p>Instructions for installing and using the compiled adapters, and download links, can be found in <a href="http://www.sidesofmarch.com/index.php/projects/cssfriendly-the-css-friendly-control-adapters-for-aspnet/">the Projects section</a> of this web site.</p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=50&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2006/11/24/compiled-version-of-aspnet-cssfriendly-control-adapters-rtm-10/' addthis:title='Compiled version of ASP.Net CSSFriendly Control Adapters (RTM 1.0) ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2006/11/24/compiled-version-of-aspnet-cssfriendly-control-adapters-rtm-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiled version of ASP.Net CSSAdapters (Beta 3.0)</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2006/11/16/compiled-version-of-aspnet-cssadapters-beta-30/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2006/11/16/compiled-version-of-aspnet-cssadapters-beta-30/#comments</comments>
		<pubDate>Thu, 16 Nov 2006 14:45:58 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2006/11/16/compiled-version-of-aspnet-cssadapters-beta-30/</guid>
		<description><![CDATA[<p><strong>UPDATE 11/24/06: The 1.0 version of the adapters was released, so I updated the compiled distribution. <a href="http://www.sidesofmarch.com/index.php/archive/2006/11/24/compiled-version-of-aspnet-cssfriendly-control-adapters-rtm-10/">Read about the update here.</a></strong></p>
<p><strong>UPDATE: Added a link to download just the DLL at the bottom of the entry, and rewrote some of the &#8220;implementation&#8221; steps to make them a bit clearer.</strong></p>
<p>I&#8217;ve been following the progress of the <a href="http://www.asp.net/CSSAdapters">CSSFriendly </a><a href="http://www.asp.net/CSSAdapters">ASP.Net 2.0 </a><a href="http://www.asp.net/CSSAdapters">Control Adapters</a> (&#8220;CSSAdapters&#8221;) since they were initially launched some 6+ months ago. The team has continually worked on revising them (with <a href="http://forums.asp.net/thread/1399784.aspx">a little help from me</a>), and the latest release (Beta 3.0) seems to be something that we can live and work with comfortably.</p>
<p>One thing I&#8217;ve hated about the adapters is the implementation, which basically involves the following steps:</p>

Add a file to the App_Browsers directory.
Add a folder of JavaScript files.
Add a folder of CSS files.
Add a bunch of files to the App_Code directory
Add some
tags to the  section of your web pages (to import the stylesheets and handle some <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2006/11/16/compiled-version-of-aspnet-cssadapters-beta-30/">Compiled version of ASP.Net CSSAdapters (Beta 3.0)</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE 11/24/06: The 1.0 version of the adapters was released, so I updated the compiled distribution. <a href="http://www.sidesofmarch.com/index.php/archive/2006/11/24/compiled-version-of-aspnet-cssfriendly-control-adapters-rtm-10/">Read about the update here.</a></strong></p>
<p><strong>UPDATE: Added a link to download just the DLL at the bottom of the entry, and rewrote some of the &#8220;implementation&#8221; steps to make them a bit clearer.</strong></p>
<p>I&#8217;ve been following the progress of the <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.asp.net%2FCSSAdapters&sref=rss">CSSFriendly </a><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.asp.net%2FCSSAdapters&sref=rss">ASP.Net 2.0 </a><a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.asp.net%2FCSSAdapters&sref=rss">Control Adapters</a> (&#8220;CSSAdapters&#8221;) since they were initially launched some 6+ months ago. The team has continually worked on revising them (with <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fforums.asp.net%2Fthread%2F1399784.aspx&sref=rss">a little help from me</a>), and the latest release (Beta 3.0) seems to be something that we can live and work with comfortably.</p>
<p>One thing I&#8217;ve hated about the adapters is the implementation, which basically involves the following steps:</p>
<ol>
<li>Add a file to the App_Browsers directory.</li>
<li>Add a folder of JavaScript files.</li>
<li>Add a folder of CSS files.</li>
<li>Add a bunch of files to the App_Code directory</li>
<li>Add some
<link />tags to the  section of your web pages (to import the stylesheets and handle some conditional imports for IE6 and IE7).</li>
</ol>
<p>Apparently, I&#8217;m not the only person who thinks there should be an easier way, and it seems that the folks working on the CSSAdapters agree (see the <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fforums.asp.net%2Fthread%2F1448692.aspx&sref=rss">Serving Suggestions topic</a> on the <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fforums.asp.net%2F&sref=rss">ASP.Net forums</a>).</p>
<p>Inspired by the posts in that topic (especially the post by HardyE), I present to you a fully-compiled version of the CSSAdapters (Beta 3.0). A few notes on the implementation follow.</p>
<ul>
<li>All the CSS and JavaScript files are now embedded resources &#8212; no more files to manage; everything is in one DLL.</li>
<li>The only CSS files embedded are those that actually do anything. In other words, I removed all but the following: DetailsView.css, Menu.css, TreeView.css, IEMenu6.css, and IEMenu7.css.</li>
<li>To get the JavaScript files to register (required for the MenuAdapter, TreeViewAdapter, and all controls that use the WebControlAdapterExtender), I rewrote the RegisterScripts() method to reference the JavaScript file as a Web resource (using GetWebResourceUrl()). I also added a check to IsClientScriptIncludeRegistered() which should make sure things are only added once.</li>
<li>To get the CSS files to link (required for the MenuAdapter, TreeViewAdapter, and DetailsViewAdapter), I added code to the RegisterScripts() method to reference the CSS file as a Web resource (using GetWebResourceUrl()). Adding them to the web page was done by parsing a
<link />tag and adding it to the page using RegisterClientScriptBlock(). As with JavaScripts, I also added a check to IsClientScriptBlockRegistered() to avoid duplication.</li>
</ul>
<p>Implementation of the compiled CSSAdapters in a web site requires the following steps. Note that only the first step is the same as those listed above; steps #2 through #5 are eliminated by the &#8220;new&#8221; step #2 below.</p>
<ol>
<li>Add the appropriate file to your App_Browsers directory (this step doesn&#8217;t go away, and it shouldn&#8217;t, because essentially this is a configuration file).</li>
<li>Add the compiled CSSAdapters.dll to your web site&#8217;s bin directory.</li>
</ol>
<p>This makes it much easier to implement and manage than before. Note that this implementation wasn&#8217;t heavily tested, but it worked flawlessly with the CSSAdapters demo app (which is included in the distribution I&#8217;m providing here). Let me know how it works for you, or if you have any problems or suggestions.</p>
<p>For instructions and download links, go to <a href="http://www.sidesofmarch.com/index.php/projects/cssfriendly-the-css-friendly-control-adapters-for-aspnet/">the Projects section</a> of this web site.</p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=51&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2006/11/16/compiled-version-of-aspnet-cssadapters-beta-30/' addthis:title='Compiled version of ASP.Net CSSAdapters (Beta 3.0) ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2006/11/16/compiled-version-of-aspnet-cssadapters-beta-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What the #&amp;$^# is Windows doing this time? (and other Microsoft gripes)</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2006/10/30/what-the-is-windows-doing-this-time-and-other-microsoft-gripes/</link>
		<comments>http://www.sidesofmarch.com/index.php/archive/2006/10/30/what-the-is-windows-doing-this-time-and-other-microsoft-gripes/#comments</comments>
		<pubDate>Mon, 30 Oct 2006 16:47:56 +0000</pubDate>
		<dc:creator>brian</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2006/10/30/what-the-is-windows-doing-this-time-and-other-microsoft-gripes/</guid>
		<description><![CDATA[<p>Yesterday, while starting up my PC out of hibernate mode (an activity done about 250 times before), after entering my username and password, Windows stared at me with a blank blue screen and a task bar (i.e. the desktop color and nothing else). Windows was certainly doing something, because the disk was thrashing. This went on for about five minutes. No activity on my part (CTL-ALT-DEL, CTL-SHIFT-ESC for Task Manager, etc.) brought about a response during those five minutes. After banging my keyboard countless times (it&#8217;s amazing I don&#8217;t break more than one a year), Windows suddenly sprang into service as if nothing out of the ordinary happened.</p>
<p>Can someone please tell me what the #&#038;^$&#^ Windows was doing during those five minutes, and if it was such a mission-critical operation that NO OTHER ACTIVITIES could be taken while they ran, why there is no notice in the event log? Heck, a progress bar or meaningless popup message would have been nice.</p>
<p>Today, <span style="color:#777"> . . .<br /><br />&#8594; Read More: <a href="http://www.sidesofmarch.com/index.php/archive/2006/10/30/what-the-is-windows-doing-this-time-and-other-microsoft-gripes/">What the #&#038;$^# is Windows doing this time? (and other Microsoft gripes)</a></span>]]></description>
			<content:encoded><![CDATA[<p>Yesterday, while starting up my PC out of hibernate mode (an activity done about 250 times before), after entering my username and password, Windows stared at me with a blank blue screen and a task bar (i.e. the desktop color and nothing else). Windows was certainly doing something, because the disk was thrashing. This went on for about five minutes. No activity on my part (CTL-ALT-DEL, CTL-SHIFT-ESC for Task Manager, etc.) brought about a response during those five minutes. After banging my keyboard countless times (it&#8217;s amazing I don&#8217;t break more than one a year), Windows suddenly sprang into service as if nothing out of the ordinary happened.</p>
<p>Can someone please tell me what the #&#038;^$&#^ Windows was doing during those five minutes, and if it was such a mission-critical operation that NO OTHER ACTIVITIES could be taken while they ran, why there is no notice in the event log? Heck, a progress bar or meaningless popup message would have been nice.</p>
<p>Today, I attempt to hit the F1 key to get &#8220;help&#8221; in Visual Studio 2003 (yes, we all need help sometimes). VS2k3 has been run many times in the past, and I keep it up-to-date with the latest MSDN updates (i.e. the occasional help file updates). After pressing F1, Windows Installer pops up. Deciding to give up all hope on getting the help I need (and understanding that a random Internet search is faster than Windows Installer), I click Cancel. After about four minutes, the &#8220;Canceling&#8230;&#8221; message disappears, replaced by a new &#8220;Please wait while Windows installs&#8230;&#8221; message. I click cancel again. I shut down Visual Studio. The Windows Installer finally ended it &#8220;canceling&#8221; process after ten minutes, and I have a new message on my screen: &#8220;Microsoft Development Environment has encountered a problem and needs to close&#8230;&#8221; Yeah, yeah. Thanks for nothing.</p>
<p>It&#8217;s amazing how Microsoft can do so many things well, yet can&#8217;t do some of the most important things right &#8212; like make a responsive operating system. Then again, I shouldn&#8217;t expect much more. After all, this is a company that delivered an excellent development framework (.Net) yet decided that the framework includes platform-specific implementations (now that WinFX stuff is a &#8220;core&#8221; part of .Net). It&#8217;s funny how I spend a good part of my development time customizing built-in ASP.Net controls to do what I want them to do and not do what they were designed to do.</p>
<p>My three biggest complaints with ASP.Net, in no particular order&#8230;</p>
<ol>
<li>Naming containers. I understand why, but they make it almost impossible to write client-side JavaScript code. Microsoft&#8217;s answer to that is to register your scripts in codebehind and reference &#8220;ClientID&#8221; properties, but that is hardly a programming solution.</li>
<li>The insistence on formatting with TABLEs (which is finally being addressed with the <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.asp.net%2Fcssadapters&sref=rss">CSS adapters</a>).</li>
<li>The single-form limtation of ASP.Net, the dependency on ViewState, and the whole rely-on-postback model (which translates fine to some applications but terribly to others).</li>
<li>The general goal of not expecting developers to write code. I want to write code &#8212; I want to control my application. Enhanced ASP.Net controls (things like GridViews) should be add-ons, much like you buy a component library from a company like <a href="http://redirectingat.com?id=17923X751173&xs=1&url=http%3A%2F%2Fwww.componentart.com%2F&sref=rss">ComponentArt</a> (whose WebUI suite I use often). Microsoft can make them if it wants to, but don&#8217;t force-feed it on everyone.</li>
</ol>
<p>Yeah I know that was four, but I&#8217;m a bit peeved by Microsoft today. <img src='http://www.sidesofmarch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://www.sidesofmarch.com/?ak_action=api_record_view&id=58&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.sidesofmarch.com/index.php/archive/2006/10/30/what-the-is-windows-doing-this-time-and-other-microsoft-gripes/' addthis:title='What the #&amp;$^# is Windows doing this time? (and other Microsoft gripes) ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.sidesofmarch.com/index.php/archive/2006/10/30/what-the-is-windows-doing-this-time-and-other-microsoft-gripes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

