<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>ASP.NET</title>
        <link>http://bchavez.bitarmory.com/category/7.aspx</link>
        <description>ASP.NET related posts.</description>
        <language>en-US</language>
        <copyright>Brian Chavez</copyright>
        <managingEditor>bchavez@bitarmory.com</managingEditor>
        <generator>Subtext Version 1.9.5.176</generator>
        <item>
            <title>Visual Studio 2008 SP1 and .NET 3.5 SP1 RTM</title>
            <link>http://bchavez.bitarmory.com/archive/2008/08/11/visual-studio-2008-sp1-and-.net-3.5-sp1-rtm.aspx</link>
            <description>&lt;p&gt;&lt;img height="50" alt="image" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/VisualStudio2008SP1and.NET3.5SP1RTM_B9E4/image_14fc3cb5-ba7f-4d48-9523-c0b6ace032ea.png" width="240" align="right" border="0" /&gt;Visual Studio 2008 SP1 (Service Pack 1) is ready for download.  &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Click below for the links:&lt;/p&gt;  &lt;p&gt;VS2008 SP1 EXE Installer:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;or&lt;/p&gt;  &lt;p&gt;VS2008 SP1 ISO Installer:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyId=27673C47-B3B5-4C67-BD99-84E525B5CE61&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=27673C47-B3B5-4C67-BD99-84E525B5CE61&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=27673C47-B3B5-4C67-BD99-84E525B5CE61&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Happy updating!&lt;/p&gt;  &lt;p&gt;-Brian Chavez&lt;/p&gt;&lt;img src="http://bchavez.bitarmory.com/aggbug/64.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Brian Chavez</dc:creator>
            <guid>http://bchavez.bitarmory.com/archive/2008/08/11/visual-studio-2008-sp1-and-.net-3.5-sp1-rtm.aspx</guid>
            <pubDate>Mon, 11 Aug 2008 20:13:28 GMT</pubDate>
            <wfw:comment>http://bchavez.bitarmory.com/comments/64.aspx</wfw:comment>
            <comments>http://bchavez.bitarmory.com/archive/2008/08/11/visual-studio-2008-sp1-and-.net-3.5-sp1-rtm.aspx#feedback</comments>
            <wfw:commentRss>http://bchavez.bitarmory.com/comments/commentRss/64.aspx</wfw:commentRss>
            <trackback:ping>http://bchavez.bitarmory.com/services/trackbacks/64.aspx</trackback:ping>
        </item>
        <item>
            <title>Understanding ScriptResource and WebResource in ASP.NET</title>
            <link>http://bchavez.bitarmory.com/archive/2008/07/28/understanding-scriptresource-and-webresource-in-asp.net.aspx</link>
            <description>&lt;p&gt;Here are some common questions about ASP.NET and web resources:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;What is a web resource? &lt;/li&gt;    &lt;li&gt;How do I get my embedded scripts to be delivered by ScriptResource.axd handler? &lt;/li&gt;    &lt;li&gt;How do I get my embedded scripts to be delivered by WebResource.axd handler? &lt;/li&gt;    &lt;li&gt;What is the difference between ScriptResource.axd and WebResource.axd? &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;First, let's tackle the first question.  What is a web resource and why would you use such a thing?&lt;/p&gt;  &lt;h2&gt;Web Resources&lt;/h2&gt;  &lt;p&gt;A web resource is a file embedded in an assembly.  This file can either be a JavaScript file or a BMP, or any other emendable type of resource in an assembly.  Just take a look at &lt;strong&gt;System.Web&lt;/strong&gt; and all the embedded resources that are defined:&lt;/p&gt;  &lt;p&gt;&lt;img height="290" alt="image" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/UnderstandingScriptResourceandWebRes.NET_3AEA/image_e03979ef-8357-4a4e-9163-c2e4bcad15fe.png" width="651" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;You'll notice there are both, Images and Scripts.  There's even some html!  So, web resources (at an assembly level) can be composed of just about anything you want.&lt;/p&gt;  &lt;h2&gt;How do you define Web Resources? &lt;/h2&gt;  &lt;p&gt;Meet the &lt;strong&gt;[WebResource]&lt;/strong&gt; attribute.  You define web resources by using the &lt;strong&gt;WebResource&lt;/strong&gt; attribute.  The &lt;strong&gt;WebResourceAttribute&lt;/strong&gt; acts as an access marker to allow resource handlers to find your resources.  The first parameter to &lt;strong&gt;WebResource&lt;/strong&gt; is the name of the web resource, the second parameter is the &lt;strong&gt;ContentType&lt;/strong&gt;.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;[WebResource&lt;/strong&gt;(       &lt;br /&gt;  &lt;em&gt;webResourceName&lt;/em&gt;       &lt;br /&gt;    Type: System.String       &lt;br /&gt;    The name of the of Web resource.       &lt;br /&gt;,       &lt;br /&gt;  &lt;em&gt;contentType&lt;/em&gt;       &lt;br /&gt;    Type: System.String       &lt;br /&gt;    The type of resource, such as "image/gif" or "text/javascript".       &lt;br /&gt;)&lt;strong&gt;]&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;img height="120" alt="image" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/UnderstandingScriptResourceandWebRes.NET_3AEA/image_a88d8e20-9d5d-4b74-ad41-c890bb987b4a.png" width="226" align="right" border="0" /&gt; Once you have your [&lt;strong&gt;WebResource&lt;/strong&gt;] defined in your assembly, the next step is to mark the file you want embedded as an "&lt;strong&gt;Embedded Resource&lt;/strong&gt;" in Visual Studio.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h2&gt; &lt;/h2&gt;  &lt;h2&gt; &lt;/h2&gt;  &lt;h2&gt;Working with Assembly Resources&lt;/h2&gt;  &lt;p&gt;There are two basic ways to getting at your assembly resources loaded on your ASP.NET web page.  &lt;strong&gt;ScriptResource.axd&lt;/strong&gt; and &lt;strong&gt;WebResource.axd&lt;/strong&gt;.&lt;/p&gt;  &lt;h3&gt;Using WebResource.axd&lt;/h3&gt;  &lt;p&gt;Generally, you'll want to use WebResource.axd when you are dealing with binary resources.  Things like emendable images or other types of media.  You can use WebResource for serving out JavaScript files but there is a better alternative.  However, if you're stuck in ASP.NET 2.0 land with out Microsoft AJAX, then &lt;strong&gt;WebResource.axd&lt;/strong&gt; is your only option to serve out your embedded assembly resources.  To make your assembly resources available on your ASP.NET page, simply use:&lt;/p&gt;  &lt;div style="font-size: 10pt; background: #313132; color: #dfdfc0; font-family: courier new"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  104&lt;/span&gt;  &lt;span style="color: #7a987a"&gt;//Uses WebResource.axd&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  105&lt;/span&gt;  &lt;span style="font-weight: bold; color: #5b8a86"&gt;this&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Page&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;ClientScript&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;RegisterClientScriptResource( &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  106&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;typeof&lt;/span&gt;(&lt;span style="color: #9ea6da"&gt;SwfObject&lt;/span&gt;), &lt;span style="color: #b8ced3"&gt;"ProjectBase.Web.Scripts.swfobject.js"&lt;/span&gt; );&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  107&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  108&lt;/span&gt;  &lt;span style="font-weight: bold; color: #5b8a86"&gt;string&lt;/span&gt; urlToFunnyWebResourceUrl &lt;span style="color: #c9b68f"&gt;=&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  109&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;this&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Page&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;ClientScript&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;GetWebResourceUrl(&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  110&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;typeof&lt;/span&gt;(&lt;span style="color: #9ea6da"&gt;SwfObject&lt;/span&gt;), &lt;span style="color: #b8ced3"&gt;"ProjectBase.Web.Images.Header.gif"&lt;/span&gt; );&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;&lt;strong&gt;urlToFunnyWebResourceUrl&lt;/strong&gt; is the the actual absolute path to your webresource.  So you could potentially use it to link to an image or script.  &lt;strong&gt;ClientScript.Register*&lt;/strong&gt; are generally reserved for loading JavaScript.  It's pretty straight forward, pass in the &lt;strong&gt;typeof(Control)&lt;/strong&gt; that's requesting the resource, and the full name to the assembly resource.  The result of these calls will generate URLs to &lt;strong&gt;WebResource.axd&lt;/strong&gt;.&lt;/p&gt;  &lt;h3&gt;Using ScriptResource.axd&lt;/h3&gt;  &lt;p&gt;As I mentioned earlier, there is a better alternative for loading your JavaScript assets if you're working with ASP.NET AJAX.  Using ScriptResource.axd handler actually has some interesting features.  Some features include:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Automatically GZip/Compressing your scripts over HTTP for delivery. &lt;/li&gt;    &lt;li&gt;Dynamically resolving Release/Debug scripts based on build parameters.  This is useful, if you keep two types of the same script: one for debug, and one packed for release. &lt;/li&gt;    &lt;li&gt;Can be used for Non-MsAJAX Framework script assets such as jQuery. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The &lt;strong&gt;ScriptManager&lt;/strong&gt; object is how we can get our embedded JavaScript into our page using &lt;strong&gt;ScriptResource.axd&lt;/strong&gt;:&lt;/p&gt;  &lt;div style="font-size: 10pt; background: #313132; color: #dfdfc0; font-family: courier new"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  112&lt;/span&gt;  &lt;span style="color: #7a987a"&gt;//Uses ScriptManager.axd&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  113&lt;/span&gt;  &lt;span style="color: #9ea6da"&gt;ScriptManager&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;RegisterClientScriptResource(&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  114&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;this&lt;/span&gt;, &lt;span style="font-weight: bold; color: #5b8a86"&gt;typeof&lt;/span&gt;(&lt;span style="color: #9ea6da"&gt;SwfObject&lt;/span&gt;), &lt;span style="color: #b8ced3"&gt;"ProjectBase.Web.Scripts.swfobject.js"&lt;/span&gt; );&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;The calling semantics are pretty much the same as the previous calls to WebResource.axd, the only difference is that we are passing in &lt;strong&gt;this&lt;/strong&gt; instance of the control that wants to register the script.  The effect of calling this method results in scripts being loaded from &lt;strong&gt;ScriptResource.axd&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;That's it!  Happy coding!  I'll probably add some more tips on this post if I come across any.&lt;/p&gt;  &lt;p&gt;Brian Chavez&lt;/p&gt;&lt;img src="http://bchavez.bitarmory.com/aggbug/62.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Brian Chavez</dc:creator>
            <guid>http://bchavez.bitarmory.com/archive/2008/07/28/understanding-scriptresource-and-webresource-in-asp.net.aspx</guid>
            <pubDate>Mon, 28 Jul 2008 11:11:56 GMT</pubDate>
            <wfw:comment>http://bchavez.bitarmory.com/comments/62.aspx</wfw:comment>
            <comments>http://bchavez.bitarmory.com/archive/2008/07/28/understanding-scriptresource-and-webresource-in-asp.net.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://bchavez.bitarmory.com/comments/commentRss/62.aspx</wfw:commentRss>
            <trackback:ping>http://bchavez.bitarmory.com/services/trackbacks/62.aspx</trackback:ping>
        </item>
        <item>
            <title>The ParseChildren PersistChildren and PersistenceMode.InnerProperty</title>
            <link>http://bchavez.bitarmory.com/archive/2008/07/27/parsechildren-persistchildren-persistencemode.innerproperty.aspx</link>
            <description>&lt;p&gt;After a while of non-web control development, &lt;strong&gt;ParseChildren&lt;/strong&gt; and &lt;strong&gt;PersistChildren&lt;/strong&gt; attributes are important attributes to remember when trying to get the desired results your looking for in the Visual Studio designer.&lt;/p&gt;  &lt;p&gt;So, this post should clear up (and serve as a reminder for me) how and why these attributes are important.  Let's explore what these two attributes are used for.  Let's start with &lt;strong&gt;ParseChildren&lt;/strong&gt;.&lt;/p&gt;  &lt;h2 align="center"&gt;The &lt;strong&gt;&lt;font face="Courier New"&gt;[ParseChildrenAttribute]&lt;/font&gt;&lt;/strong&gt;&lt;/h2&gt;  &lt;p&gt;The &lt;strong&gt;ParseChildren&lt;/strong&gt; Attribute is probably, the most important attribute you should pay attention to when developing web controls.  It's actually used by the ASP.NET Parser and &lt;strong&gt;ControlBuilder&lt;/strong&gt; object to figure out how to parse the ASP.NET code you write.  Visual Studio also uses this attribute to figure out what valid sub-controls and components are allowed within the contents of a server control.&lt;/p&gt;  &lt;p&gt;Let's say, I want to create an &lt;strong&gt;AggregateFeeds&lt;/strong&gt; control that displays an aggregate list of RSS feeds.&lt;/p&gt;  &lt;h2&gt;A Basic and Boring Control Syntax&lt;/h2&gt;  &lt;h4&gt;&lt;strong&gt;&lt;img height="126" alt="image" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/ParseChildrenPersistChildr.InnerProperty_14EFD/image_14210353-b7f5-4317-962a-bc34a4c27414.png" width="455" border="0" /&gt;&lt;/strong&gt;&lt;/h4&gt;  &lt;p&gt;You'll notice that the &lt;strong&gt;RssResource&lt;/strong&gt; is the only available option that is allowed as a child from the &lt;strong&gt;AggregateFeeds&lt;/strong&gt; control.  Here's the code behind the &lt;strong&gt;AggregateFeeds&lt;/strong&gt; control:&lt;/p&gt;  &lt;div style="font-size: 10pt; background: #313132; color: #dfdfc0; font-family: courier new"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  113&lt;/span&gt;     [&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  114&lt;/span&gt;     &lt;span style="color: #9ea6da"&gt;ParseChildren&lt;/span&gt;(&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  115&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;typeof&lt;/span&gt;(&lt;span style="color: #9ea6da"&gt;RssResource&lt;/span&gt;),&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  116&lt;/span&gt;         DefaultProperty &lt;span style="color: #c9b68f"&gt;=&lt;/span&gt; &lt;span style="color: #b8ced3"&gt;"Feeds"&lt;/span&gt;,&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  117&lt;/span&gt;         ChildrenAsProperties &lt;span style="color: #c9b68f"&gt;=&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;true&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  118&lt;/span&gt;         )&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  119&lt;/span&gt;     ]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  120&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;AggregateFeeds&lt;/span&gt; : &lt;span style="color: #9ea6da"&gt;Control&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  121&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  122&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; AggregateFeeds()&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  123&lt;/span&gt;         {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  124&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;this&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Feeds &lt;span style="color: #c9b68f"&gt;=&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;new&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssFeedCollection&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  125&lt;/span&gt;         }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  126&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssFeedCollection&lt;/span&gt; Feeds&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  127&lt;/span&gt;         {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  128&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;get&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  129&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;private&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;set&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  130&lt;/span&gt;         }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  131&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;protected&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;override&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;void&lt;/span&gt; Render(&lt;span style="color: #9ea6da"&gt;HtmlTextWriter&lt;/span&gt; writer)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  132&lt;/span&gt;         {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  133&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;this&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Feeds&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  134&lt;/span&gt;                 &lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;ForEach( rssRes &lt;span style="color: #c9b68f"&gt;=&amp;gt;&lt;/span&gt; writer&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Write( rssRes&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Url ) );&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  135&lt;/span&gt;         }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  136&lt;/span&gt;     }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  137&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  138&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssFeedCollection&lt;/span&gt; : &lt;span style="color: #9ea6da"&gt;List&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #9ea6da"&gt;RssResource&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  139&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  140&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  141&lt;/span&gt;     }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  142&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  143&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssResource&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  144&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  145&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;string&lt;/span&gt; Url { &lt;span style="font-weight: bold; color: #5b8a86"&gt;get&lt;/span&gt;; &lt;span style="font-weight: bold; color: #5b8a86"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  146&lt;/span&gt;     }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;The &lt;strong&gt;ParseChildren&lt;/strong&gt; attribute on &lt;strong&gt;AggregateFeeds&lt;/strong&gt; tells the ASP.NET, that any children within the &lt;strong&gt;AggregateFeeds&lt;/strong&gt; control should be &lt;strong&gt;typeof(RssResource)&lt;/strong&gt;.  &lt;strong&gt;ChildrenAsProperties=true&lt;/strong&gt; let's ASP.NET know that it should STOP parsing server controls with "runat=server", and switch to instantiating objects into the properties of the &lt;strong&gt;ArggregateFeeds&lt;/strong&gt; control.  &lt;strong&gt;DefaultProperty&lt;/strong&gt; says, that the results of the parsed objects should go into the default property &lt;strong&gt;Feeds&lt;/strong&gt;.&lt;/p&gt;  &lt;h2&gt;Syntax Goodness With InnerProperty&lt;/h2&gt;  &lt;p&gt;The previous example was great, it's simple and get's the job done.  But let's say, the requirements have changed, our control is growing, and we need to allow more customization, and extensibility for the consumers of our &lt;strong&gt;AggregateFeeds&lt;/strong&gt; control.&lt;/p&gt;  &lt;p&gt;Let's clean up the markup and allow our developers to create markup like this: &lt;/p&gt;  &lt;p&gt;&lt;img height="174" alt="image" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/ParseChildrenPersistChildr.InnerProperty_14EFD/image_95a7c170-dbd2-4ad8-bd89-7e7b13006914.png" width="486" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;To get this type of syntactical behavior, check out the code below:&lt;/p&gt;  &lt;div style="font-size: 10pt; background: #313132; color: #dfdfc0; font-family: courier new"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  113&lt;/span&gt;     [&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  114&lt;/span&gt;     &lt;span style="color: #9ea6da"&gt;ParseChildren&lt;/span&gt;(&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  115&lt;/span&gt;         ChildrenAsProperties &lt;span style="color: #c9b68f"&gt;=&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;true&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  116&lt;/span&gt;         )&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  117&lt;/span&gt;     ]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  118&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;AggregateFeeds&lt;/span&gt; : &lt;span style="color: #9ea6da"&gt;Control&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  119&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  120&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; AggregateFeeds()&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  121&lt;/span&gt;         {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  122&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;this&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Feeds &lt;span style="color: #c9b68f"&gt;=&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;new&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssFeedCollection&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  123&lt;/span&gt;         }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  124&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  125&lt;/span&gt;         [&lt;span style="color: #9ea6da"&gt;PersistenceMode&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;PersistenceMode&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;InnerProperty)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  126&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssFeedCollection&lt;/span&gt; Feeds&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  127&lt;/span&gt;         {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  128&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;get&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  129&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;private&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;set&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  130&lt;/span&gt;         }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  131&lt;/span&gt;         [&lt;span style="color: #9ea6da"&gt;PersistenceMode&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;PersistenceMode&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;InnerProperty)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  132&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;AggregateSettings&lt;/span&gt; Settings&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  133&lt;/span&gt;         {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  134&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;get&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  135&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;private&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;set&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  136&lt;/span&gt;         }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  137&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;protected&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;override&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;void&lt;/span&gt; Render(&lt;span style="color: #9ea6da"&gt;HtmlTextWriter&lt;/span&gt; writer)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  138&lt;/span&gt;         {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  139&lt;/span&gt;             &lt;span style="font-weight: bold; color: #5b8a86"&gt;this&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Feeds&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  140&lt;/span&gt;                 &lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;ForEach( rssRes &lt;span style="color: #c9b68f"&gt;=&amp;gt;&lt;/span&gt; writer&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Write( rssRes&lt;span style="color: #c9b68f"&gt;.&lt;/span&gt;Url ) );&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  141&lt;/span&gt;         }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  142&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  143&lt;/span&gt;     }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  144&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  145&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;AggregateSettings&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  146&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  147&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;int&lt;/span&gt; TimeOut { &lt;span style="font-weight: bold; color: #5b8a86"&gt;get&lt;/span&gt;; &lt;span style="font-weight: bold; color: #5b8a86"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  148&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;bool&lt;/span&gt; CacheResults { &lt;span style="font-weight: bold; color: #5b8a86"&gt;get&lt;/span&gt;; &lt;span style="font-weight: bold; color: #5b8a86"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  149&lt;/span&gt;     }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  150&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  151&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssFeedCollection&lt;/span&gt; : &lt;span style="color: #9ea6da"&gt;List&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #9ea6da"&gt;RssResource&lt;/span&gt;&lt;span style="color: #c9b68f"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  152&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  153&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  154&lt;/span&gt;     }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  155&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  156&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssResource&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  157&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  158&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;string&lt;/span&gt; Url { &lt;span style="font-weight: bold; color: #5b8a86"&gt;get&lt;/span&gt;; &lt;span style="font-weight: bold; color: #5b8a86"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  159&lt;/span&gt;     }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Notice, we've removed &lt;strong&gt;DefaultProperty&lt;/strong&gt; and &lt;strong&gt;typeof(RssResource)&lt;/strong&gt; from &lt;strong&gt;ParseChildren&lt;/strong&gt; attribute.  We're no longer working with a simple control that has simple children objects that need to be parsed, we're now working with a complex control with more than one property that we're setting in the markup, so we've removed the "default" stuff.  The syntactical magic happens with &lt;strong&gt;PersitanceMode&lt;/strong&gt; attribute on the properties.  &lt;strong&gt;PersistanceMode.InnerProperty&lt;/strong&gt; allows us to specify our cool &lt;strong&gt;&amp;lt;Feeds&amp;gt;&lt;/strong&gt; and &lt;strong&gt;&amp;lt;Settings&amp;gt;&lt;/strong&gt; tags.  How does Visual Studio know what members are available?  It does so by Reflection.&lt;/p&gt;  &lt;h2&gt;Get fancy, more than one child type&lt;/h2&gt;  &lt;p&gt;Also, I want to point out, suppose, we want to support multiple types of Feed objects.  We could use an &lt;strong&gt;enum&lt;/strong&gt; in &lt;strong&gt;RssResource&lt;/strong&gt;, or &lt;em&gt;&lt;strong&gt;we could use inheritance&lt;/strong&gt;&lt;/em&gt; to achieve the following: &lt;/p&gt;  &lt;p&gt;&lt;img height="172" alt="image" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/ParseChildrenPersistChildr.InnerProperty_14EFD/image_f6b0cfb2-991f-4694-9c26-c6aeb665c665.png" width="485" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;All we would have to do is simply mark &lt;strong&gt;RssResource&lt;/strong&gt; as an abstract class. Then, subclass for each type.&lt;/p&gt;  &lt;div style="font-size: 10pt; background: #313132; color: #dfdfc0; font-family: courier new"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  156&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;abstract&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;RssResource&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  157&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  158&lt;/span&gt;         &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;string&lt;/span&gt; Url { &lt;span style="font-weight: bold; color: #5b8a86"&gt;get&lt;/span&gt;; &lt;span style="font-weight: bold; color: #5b8a86"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  159&lt;/span&gt;     }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  160&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;MediaRss&lt;/span&gt; : &lt;span style="color: #9ea6da"&gt;RssResource&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  161&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  162&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  163&lt;/span&gt;     }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  164&lt;/span&gt;     &lt;span style="font-weight: bold; color: #5b8a86"&gt;public&lt;/span&gt; &lt;span style="font-weight: bold; color: #5b8a86"&gt;class&lt;/span&gt; &lt;span style="color: #9ea6da"&gt;ITunesRss&lt;/span&gt; : &lt;span style="color: #9ea6da"&gt;RssResource&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  165&lt;/span&gt;     {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  166&lt;/span&gt; &lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #eaaf00"&gt;  167&lt;/span&gt;     }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Again, I'm just showing that it's possible, but following my mantra of "less code, less maintenance," I'd use an enum to describe the type of rss feed on &lt;strong&gt;RssResource&lt;/strong&gt;.&lt;/p&gt;  &lt;h2&gt;Where is [PersistChildren]?&lt;/h2&gt;  &lt;p&gt;Nowhere!  Is &lt;strong&gt;PersistChildren&lt;/strong&gt; attribute needed?  No, it's not a required attribute to create your custom control.  The &lt;strong&gt;PersistChildrenAttribute&lt;/strong&gt; only provides designer support for your control with Visual Studio and has no "processing" affect in ASP.NET, but remember &lt;strong&gt;&lt;em&gt;&lt;font color="#008080"&gt;Parse&lt;/font&gt;Children&lt;/em&gt;&lt;/strong&gt; does.&lt;/p&gt;  &lt;p&gt;I'm a &lt;img height="23" alt="image" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/ParseChildrenPersistChildr.InnerProperty_14EFD/image_9ebafac6-76b0-47f7-b53a-444b371858c6.png" width="189" border="0" /&gt;  source-view only guy.  I really don't remember the last time I've used the Visual Studio "Design View", it's a waste, crashes all the time, so I've pretty much given up on it.  Besides, "Design View" is for n00bs anyway.  Just kidding!  If you plan on using the Design View, then you'll probably need your &lt;strong&gt;PersistChildren&lt;/strong&gt; attribute...&lt;/p&gt;  &lt;p&gt;In general, &lt;strong&gt;PersistChildren&lt;/strong&gt; and &lt;strong&gt;ParseChildren&lt;/strong&gt; are exclusive complementary attributes to describe the same semantic operation.  The rule of thumb goes:&lt;/p&gt;  &lt;p&gt;If &lt;strong&gt;&lt;em&gt;&lt;font color="#008080"&gt;Parse&lt;/font&gt;&lt;/em&gt;Children(&lt;font color="#008040"&gt;true&lt;/font&gt;)&lt;/strong&gt;, then &lt;strong&gt;&lt;em&gt;&lt;font color="#008080"&gt;Persist&lt;/font&gt;&lt;/em&gt;Children(&lt;font color="#ff0000"&gt;false&lt;/font&gt;)&lt;/strong&gt;.  &lt;/p&gt;  &lt;p&gt;If&lt;em&gt; &lt;/em&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#008080"&gt;Parse&lt;/font&gt;&lt;/em&gt;Children(&lt;font color="#ff0000"&gt;false&lt;/font&gt;)&lt;/strong&gt;, then &lt;strong&gt;&lt;em&gt;&lt;font color="#008080"&gt;Persist&lt;/font&gt;&lt;/em&gt;Children(&lt;font color="#008000"&gt;true&lt;/font&gt;)&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;Following the &lt;strong&gt;PersistChildren&lt;/strong&gt; guideline above should keep your code out of trouble.  But again, I wouldn't use &lt;strong&gt;PersistChildren&lt;/strong&gt; only until you actually need it.  Less code, less maintenance.&lt;/p&gt;  &lt;p&gt;Here's a nice list of attributes you should consider when writing your custom controls:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://wdevs.blogspot.com/2007/10/attributes-to-consider-applying-when.html" href="http://wdevs.blogspot.com/2007/10/attributes-to-consider-applying-when.html"&gt;http://wdevs.blogspot.com/2007/10/attributes-to-consider-applying-when.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hope that helps! Happy coding!&lt;/p&gt;  &lt;p&gt;Brian Chavez&lt;/p&gt;&lt;img src="http://bchavez.bitarmory.com/aggbug/61.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Brian Chavez</dc:creator>
            <guid>http://bchavez.bitarmory.com/archive/2008/07/27/parsechildren-persistchildren-persistencemode.innerproperty.aspx</guid>
            <pubDate>Mon, 28 Jul 2008 06:49:49 GMT</pubDate>
            <wfw:comment>http://bchavez.bitarmory.com/comments/61.aspx</wfw:comment>
            <comments>http://bchavez.bitarmory.com/archive/2008/07/27/parsechildren-persistchildren-persistencemode.innerproperty.aspx#feedback</comments>
            <slash:comments>14</slash:comments>
            <wfw:commentRss>http://bchavez.bitarmory.com/comments/commentRss/61.aspx</wfw:commentRss>
            <trackback:ping>http://bchavez.bitarmory.com/services/trackbacks/61.aspx</trackback:ping>
        </item>
        <item>
            <title>NHibernate - null id in entry (don't flush the Session after an exception occurs)</title>
            <link>http://bchavez.bitarmory.com/archive/2007/11/14/nhibernate---null-id-in-entry-dont-flush-the-session.aspx</link>
            <description>&lt;p&gt;&lt;img style="margin: 10px" height="52" alt="image" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/NHibernatenullidinentrydontflushtheSessi_BC87/image_308de7db-c740-4525-b003-2ded000b06d0.png" width="230" align="left" border="0" /&gt;I ran into this issue today when trying to persist one of my objects.  The cause of the problem was interesting.  I was trying to save an object when a property/columns in the table had a unique constraint.  As a result, the object that I was trying to persist would not persist simply because the object's property it failed to meet the unique constraint.&lt;/p&gt; &lt;p&gt;As a result, a call to Save() on the object failed and the ID on the object I was trying to save was not set, but NHibernate still processed the object and associated it with its persistence mechanism leaving it in a "semi-persistent" state with the NHibernate persistence manager (ie: NHibernate now knows about the object you tried to save and it SHOULD have fully evicted the object from its persistence manager because the save failed, but it didn't).&lt;/p&gt; &lt;p&gt;When an HTTP request finishes on my ASP.NET application, I flush and close all NHibernate session objects at the time the request is done.  And as a result, when the HTTP request finished, NHibernate attempted to flush the jacked up "semi-persistent" object (an object who's ID was null) and ultimately generating the error above.&lt;/p&gt; &lt;p&gt;So, the solution that I implemented was to wrap the Save() in a try{} catch{} statement, and if the save failed, immediately close and shutdown the session, handle the error/exception.  Then, check if Session.IsOpen when the HTTP request finishes.&lt;/p&gt; &lt;p&gt;Hope that helps, &lt;img alt="confused0081.gif" src="http://bchavez.bitarmory.com/Images/emotions/confused0081.gif" /&gt;&lt;/p&gt; &lt;p&gt;Brian Chavez&lt;/p&gt;&lt;img src="http://bchavez.bitarmory.com/aggbug/37.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Brian Chavez</dc:creator>
            <guid>http://bchavez.bitarmory.com/archive/2007/11/14/nhibernate---null-id-in-entry-dont-flush-the-session.aspx</guid>
            <pubDate>Wed, 14 Nov 2007 21:41:11 GMT</pubDate>
            <wfw:comment>http://bchavez.bitarmory.com/comments/37.aspx</wfw:comment>
            <comments>http://bchavez.bitarmory.com/archive/2007/11/14/nhibernate---null-id-in-entry-dont-flush-the-session.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://bchavez.bitarmory.com/comments/commentRss/37.aspx</wfw:commentRss>
            <trackback:ping>http://bchavez.bitarmory.com/services/trackbacks/37.aspx</trackback:ping>
        </item>
        <item>
            <title>Slink Framework - Strongly Typed URLs for ASP.NET</title>
            <link>http://bchavez.bitarmory.com/archive/2007/09/03/slink-framework---strongly-typed-urls-for-asp.net.aspx</link>
            <description>&lt;p align="center" style="margin-right: 0px;" dir="ltr"&gt; &lt;img width="596" height="309" border="0" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/SlinkFrameworkStronglyTypedURLsforAS.NET_D666/image926_d532bf6a-2437-4880-ae20-a2659e424203.png" alt="image926" /&gt; &lt;/p&gt;
&lt;p align="center"&gt;&lt;img width="410" height="367" border="0" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/SlinkFrameworkStronglyTypedURLsforAS.NET_D666/image_thumb15_thumb45_cc8cc10a-b851-4dcf-b26f-ccb9a9f077b3.png" alt="image_thumb15_thumb45" /&gt; &lt;/p&gt;
&lt;p&gt;I decided it was time to solve a very annoying and time consuming code maintenance/quality problem when working with ASP.NET and Visual Studio, URL verification.  If you're like me, you've probably had your fair share of HTTP 404s and ASP.NET maintenance troubles whenever you renamed a file in your web project and broken URLs in the code-behind pages that contain scattered uses of Response.Redirect() similar to the following:&lt;/p&gt;
&lt;div style="background: rgb(255, 255, 225) none repeat scroll 0%; font-size: 10pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black; line-height: 1em; font-family: courier new;"&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;protected&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;void&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; Page_Load(&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;object&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; sender, &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175); line-height: 1em;"&gt;EventArgs&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; e)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;if&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; ( User.IsInRole( &lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"admin"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; ) )&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;        Response.Redirect( &lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"~/Page2.aspx"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; );&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;if&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;( User.IsInRole( &lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"employee"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; ) )&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;        Response.Redirect( &lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"~/EmployeePages/ViewCustomers.aspx"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; );&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;if&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;( User.IsInRole(&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"customer"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;) )&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;        Response.Redirect( &lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"~/CustomerPages/ViewCatalog.aspx"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; );&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The site validation in Visual Studio somewhat is limited in its ability to validate URLs.  Visual Studio validates URLs in the HTML markup view, but doesn't validate your URLs in code-behind pages.  That's a bummer, because the code above is somewhat common in projects.  Invalid URLs that exist in your code-behind pages are hard to debug and locate... you usually don't know when you have an invalid URL lurking in your code-behind until you hit the page with your browser.  Most modern refractoring tools today do a good job refactoring code for renamed files; however, since most refactoring tools are searching for strings when renaming an ASPX file, there is a potential for error.  There have been many times when refactoring didn't help me and only made the problem worse by selecting the "search string literals" option.  Refactorability degrades when you start dealing with different media types in your markup and code-behind pages, such as Images, SWF, CSS, and JavaScript URLs.  Media types like these go unchecked, try refactoring those in your pages!&lt;img src="http://bchavez.bitarmory.com/Images/emotions/mad0259.gif" alt="mad0259.gif" /&gt;  Personally, I'd love it if there was some kind of strongly typed URL framework.  Fortunately, there has been some work in this area by &lt;a href="http://weblogs.asp.net/fmarguerie/"&gt;Fabrice Marguerie&lt;/a&gt; and his open source project &lt;a href="http://metasapiens.com/PageMethods/"&gt;PageMethods&lt;/a&gt;.  In summary, PageMethods was too strict, and didn't work well for my purposes.  I simply wanted a light-weight and fast URL framework to provide links to pages and media objects that I could use in code-behind pages and HTML markup.  I also wanted to know at compile time the validity of all the URLs in my project.  So, I decided to tackle the problem myself with a small project I created called (Strong Link), aka Slink.&lt;/p&gt;
&lt;p&gt;Now, let's revisit the same maintainability problem above using Slink with strongly typed URLs:&lt;/p&gt;
&lt;div style="background: rgb(255, 255, 225) none repeat scroll 0%; font-size: 10pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black; line-height: 1em; font-family: courier new;"&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;protected&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;void&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; Page_Load( &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;object&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; sender, &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175); line-height: 1em;"&gt;EventArgs&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; e )&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;if&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;( User.IsInRole( &lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"admin"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; ) )&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;        Response.Redirect( Slinks.&lt;/span&gt;&lt;span style="color: rgb(43, 145, 175); line-height: 1em;"&gt;Page2&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;.TidleUrl );&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;if&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;( User.IsInRole( &lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"employee"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; ) )&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;        Response.Redirect( Slinks.EmployeePages.&lt;/span&gt;&lt;span style="color: rgb(43, 145, 175); line-height: 1em;"&gt;ViewCustomers&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;.TildeUrl );&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;if&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;( User.IsInRole( &lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;"customer"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; ) )&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;        Response.Redirect( Slinks.CustomerPages.&lt;/span&gt;&lt;span style="color: rgb(43, 145, 175); line-height: 1em;"&gt;ViewCatalog&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;.TildeUrl );&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;    }        &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="line-height: 1em;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;With Slink, not only do you get cleaner code, you get compile time checking for code-behind pages! You can also use type safe links in HTML markup:&lt;/p&gt;
&lt;div style="background: rgb(255, 255, 225) none repeat scroll 0%; font-size: 10pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black; line-height: 1em; font-family: courier new;"&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;h4&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;Customer Pages&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;h4&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: green; line-height: 1em;"&gt;&amp;lt;!-- The old way, using relative path --&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;img&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;src&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;="~/Images/CustomerImage.jpg"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;alt&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;="not strongly typed image"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt; &lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt; &lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: green; line-height: 1em;"&gt;&amp;lt;!-- The new Slink type safe way, using img HTML tag --&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;img&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;src&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;='&lt;/span&gt;&lt;span style="background: rgb(255, 238, 98) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; line-height: 1em;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;# Slinks.Images.JPG.CustomerImage.TildeUrl &lt;/span&gt;&lt;span style="background: rgb(255, 238, 98) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; line-height: 1em;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;'&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;alt&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;="strongly typed url"&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: red; line-height: 1em;"&gt;     runat&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;="server"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: green; line-height: 1em;"&gt;&amp;lt;!-- The new Slink type safe way, using a web control --&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;asp&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;:&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;Image&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;ID&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;="imgControl"&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;runat&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;="server"&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: red; line-height: 1em;"&gt;           ImageUrl&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;='&lt;/span&gt;&lt;span style="background: rgb(255, 238, 98) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; line-height: 1em;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;# Slinks.Images.JPG.CustomerImage.TildeUrl &lt;/span&gt;&lt;span style="background: rgb(255, 238, 98) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; line-height: 1em;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;'&lt;/span&gt;&lt;span style="line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Yeah! And the list goes on:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Better Maintainable Code  &lt;/li&gt;
    &lt;li&gt;Better Cleaner Code  &lt;/li&gt;
    &lt;li&gt;Better Readable Code  &lt;/li&gt;
    &lt;li&gt;Better Refactorable Code  &lt;/li&gt;
    &lt;li&gt;Better Quality Code  &lt;/li&gt;
    &lt;li&gt;Support for media types other than ASPX pages  &lt;/li&gt;
    &lt;li&gt;Fast code generation  &lt;/li&gt;
    &lt;li&gt;Non-intrusive overhead (no need to call any setup methods or expensive runtime checking)  &lt;/li&gt;
    &lt;li&gt;Use as-you-go integration (doesn't require any rewrites of your code to start using Slink)  &lt;/li&gt;
    &lt;li&gt;XML configuration based  &lt;/li&gt;
    &lt;li&gt;Intellisense for any of your files and media objects!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now that's what I'm talking about. So how do you get your hands on all this Slink ASP.NET goodness?  Keep reading...&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Getting Started with Slink&lt;/h2&gt;
&lt;p&gt;There are two basic ways to use Slink:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;You can use Visual Studio and an accompanying CR_Slink Plug-In (via DXCore) to automatically generate a type safe file in your projects App_Code directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;You can use Slink.exe in a build task to generate a strongly typed safe file in your App_Code directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Details about how to setup each method is discussed later.  First, there's some XML configuration you'll need to perform to tell Slink what to generate.  Here is a sample configuration that you place in your Web.config:&lt;/p&gt;
&lt;div style="background: rgb(255, 255, 225) none repeat scroll 0%; font-size: 10pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: black; line-height: 1em; font-family: courier new;"&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: green; line-height: 1em;"&gt; Web.config &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;--&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;configuration&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;configSections&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;       &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;section&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;name&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Slink&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;type&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Slink.Core.SlinkConfigSection, Slink.Core&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;configSections&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;Slink&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;     &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;GlobalSettings&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;EngineEnabled&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;True&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;RootNamespace&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Slinks&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;     &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;NamespaceRules&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;add&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;key&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;aspxFiles&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;Extension&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;*.aspx&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;UseFolderNamespace&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;True&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;add&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;key&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;jpgFiles&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;Extension&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;*.jpg&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;NamespaceOverride&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Images.JPG&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;add&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;key&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;pngFiles&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;Extension&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;*.png&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;NamespaceOverride&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Images.PNG&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;     &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;NamespaceRules&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;Slink&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;  &amp;lt;!--&lt;/span&gt;&lt;span style="color: green; line-height: 1em;"&gt; Other configuration settings go here &lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;--&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;configuration&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Below is a brief explanation of the XML configuration settings...&lt;/p&gt;
&lt;p&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;section&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;name&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Slink&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;type&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Slink.Core.SlinkConfigSection, Slink.Core&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;This section handler needs to be added to the &lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;configSections&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;.  The &lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;section&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; tag defines the XML node that is to be handled by the SlinkConfigSection on behalf of the .NET configuration framework.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;Slink&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;          &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;GlobalSettings&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;EngineEnabled&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;True&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;RootNamespace&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Slinks&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;The &lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;GlobalSetting&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;s&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; node has two attributes &lt;span style="color: red; line-height: 1em;"&gt;EngineEnabled&lt;/span&gt; and &lt;span style="color: red; line-height: 1em;"&gt;RootNamespace&lt;/span&gt;.
    &lt;ul&gt;
        &lt;li&gt;&lt;span style="color: red; line-height: 1em;"&gt;EngineEnabled&lt;/span&gt; - Boolean - This is a project level setting. You may want to disable type safe link code generation at the project level if you are working with multiple Web Projects.  Setting EngineEnabled="False" disables code-generation at the web-project level.  &lt;/li&gt;
        &lt;li&gt;&lt;span style="color: red; line-height: 1em;"&gt;RootNamespace&lt;/span&gt; - String - Allows you to specify the Namespace for all type safe links.&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p align="center"&gt;&lt;img width="345" height="216" border="0" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/SlinkFrameworkStronglyTypedURLsforAS.NET_D666/image_thumb115_4ce6b50e-d288-481e-982d-413d9f080404.png" alt="image_thumb115" /&gt; &lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;NamespaceRules&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;add&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;key&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;aspxFiles&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;Extension&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;*.aspx&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;UseFolderNamespace&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;True&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;add&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;key&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;jpgFiles&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;Extension&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;*.jpg&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;NamespaceOverride&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Images.JPG&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;add&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;key&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;pngFiles&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;Extension&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;*.png&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt; &lt;/span&gt;&lt;span style="color: red; line-height: 1em;"&gt;NamespaceOverride&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;=&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;Images.PNG&lt;/span&gt;&lt;span style="line-height: 1em;"&gt;"&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; line-height: 1em;"&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;NamespaceRules&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21); line-height: 1em;"&gt;NamespaceRules&lt;/span&gt;&lt;span style="color: blue; line-height: 1em;"&gt;&amp;gt;&lt;/span&gt; are at the core of Slink.  Namespace rules dictate how type safe code is generated by the Slink Engine.  Namespace rules allow you to define what type of files get type safety.
    &lt;ul&gt;
        &lt;li&gt;&lt;span style="color: red; line-height: 1em;"&gt;Extension&lt;/span&gt; - String - If you wish to have type safe code generated for all ASPX pages, add a namespace rule with the Extension attribute set to "*.aspx". Including the * (asterisk) is necessary.  &lt;/li&gt;
        &lt;li&gt;&lt;span style="color: red; line-height: 1em;"&gt;UseFolderNamespace&lt;/span&gt; - Boolean - Uses the file path to generate the sub-namespaces below the root namespace.  &lt;/li&gt;
        &lt;li&gt;&lt;span style="color: red; line-height: 1em;"&gt;NamespaceOverride&lt;/span&gt; - String - Overrides the &lt;span style="color: red; line-height: 1em;"&gt;UseFolderNamespace&lt;/span&gt; attribute and allows you to define your own custom path.  Your custom namespace override is appended to &lt;span style="color: red; line-height: 1em;"&gt;RootNamespace&lt;/span&gt;. See the example below for JPG and PNG namespace overrides:&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;a atomicselection="true" href="file:///C:/Documents%20and%20Settings/Cowboy/Application%20Data/Windows%20Live%20Writer/PostSupportingFiles/135b7dc4-c607-4155-9c0d-03f6eb2784cd/image19.png"&gt;&lt;/a&gt;
&lt;p align="center"&gt;&lt;img width="410" height="367" border="0" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/SlinkFrameworkStronglyTypedURLsforAS.NET_D666/image_thumb15_thumb35_a60b8117-35c2-46fd-ba93-754611d6ee3e.png" alt="image_thumb15_thumb35" /&gt; &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;NOTE: If you have multiple files with the same name but different extension, you'll want to override namespaces to avoid type collision.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now that we have XML configuraiton out of the way, I'll walk you through on how to install Slink on your machine.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Using Visual Studio Slink Plug-In&lt;/h2&gt;
&lt;p align="center"&gt;&lt;img width="383" height="155" border="0" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/SlinkFrameworkStronglyTypedURLsforAS.NET_D666/image_thumb285_67ddb245-80eb-45be-be9b-cad34f45e44c.png" alt="image_thumb285" /&gt; &lt;/p&gt;
&lt;h4&gt;Installing VS.NET Plug-In&lt;/h4&gt;
&lt;ol&gt;
    &lt;li&gt;Install the DXCore (free) extensibility framework for Visual Studio from Developer Express &lt;a target="_blank" href="http://www.devexpress.com/Downloads/NET/IDETools/DXCore/"&gt;here&lt;/a&gt;.  &lt;/li&gt;
    &lt;li&gt;Download the Slink binaries &lt;a target="_blank" href="http://www.codeplex.com/slink/Release/ProjectReleases.aspx"&gt;Slink_bin.zip&lt;/a&gt;.  &lt;/li&gt;
    &lt;li&gt;Copy the contents of Slink_bin.zip into your DXCore Plug-In directory
    &lt;ul&gt;
        &lt;li&gt;Ex: C:\Program Files\Developer Express Inc\DXCore for Visual Studio .NET\2.0\Bin\Plugins  &lt;/li&gt;
        &lt;li&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Note: &lt;u&gt;All contents&lt;/u&gt; of the Slink_bin.zip must be extracted into the plugins directory.&lt;/strong&gt;&lt;/font&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Make sure your XML config section is defined in your Web.config, and start coding away!&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt; &lt;/h2&gt;
&lt;h2&gt;Using Slink.exe&lt;/h2&gt;
&lt;p align="center"&gt;&lt;img width="374" height="183" border="0" src="http://bchavez.bitarmory.com/images/bchavez_bitarmory_com/WindowsLiveWriter/SlinkFrameworkStronglyTypedURLsforAS.NET_D666/image_thumb275_a69bd654-535a-4483-81dc-4bc8d0901468.png" alt="image_thumb275" /&gt; &lt;/p&gt;
&lt;p&gt;Now, if you're already using the Visual Studio Plug-In, there's no need to use the Slink.exe.   But for those of you who don't have Visual Studio, or are using Visual Studio Express, using Slink.exe is the way to go.&lt;/p&gt;
&lt;h4&gt;Installing Slink.exe&lt;/h4&gt;
&lt;ol&gt;
    &lt;li&gt;Download the Slink binaries &lt;a target="_blank" href="http://www.codeplex.com/slink/Release/ProjectReleases.aspx"&gt;Slink_bin.zip&lt;/a&gt;.  &lt;/li&gt;
    &lt;li&gt;Extract the contents of to the directory of your choice
    &lt;ul&gt;
        &lt;li&gt;Ex: C:\Tools&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Run the following from the command line:
    &lt;ul&gt;
        &lt;li&gt;&lt;strong&gt;C:\Tools&amp;gt; slink.exe /webproject:&amp;lt;PathToWebProject&amp;gt;&lt;/strong&gt;  &lt;/li&gt;
        &lt;li&gt;Replace &amp;lt;PathToWebProject&amp;gt; with the full path to your project.&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;Be sure to modify your Web.config and your Namespace Rules are set.  Otherwise, the Slink won't know what to do.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;TIP: Unfortunately, Web Projects in Visual Studio are handled differently than ordinary projects.  With web projects, you can't specify any "Pre-Build" event tasks.  But there's an easy workaround for this limitation.  If you're using Visual Studio Express, and want to have your types generated before the build process/verification of your main web project, you can create a standard dummy "Class Library".  In the pre-build event for your dummy "Class Library" you can setup Slink to execute.  Then, add the dummy "Class Library" to your main web-project.  Now, anytime you build your website, your class library will be built first (and slink will run) before the build / verification process takes place on your main web-project.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That all!  After building web project (if you're using the VS.NET Slink Plug-In) or when you execute Slink.exe, you should get a file named &lt;strong&gt;&amp;lt;WebProject&amp;gt;\App_Code\Slinks.cs&lt;/strong&gt; that contains your type safe URL generated code.&lt;/p&gt;
&lt;p&gt;If you have any questions, comments, or suggestions please feel free to contact me. I hope other developers find the Slink framework useful.  Happy coding!&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Slink CodePlex Project&lt;/h2&gt;
&lt;h3&gt;&lt;a href="http://codeplex.com/slink" title="http://codeplex.com/slink"&gt;&lt;strong&gt;http://codeplex.com/slink&lt;/strong&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h2&gt;Thoughts &amp;amp; future improvements to Slink&lt;/h2&gt;
&lt;ul&gt;
    &lt;li&gt;Add support for strongly typed parameter passing/parsing for query string parameters.  &lt;/li&gt;
    &lt;li&gt;Create a standalone Slink Plug-In that does not rely on DXCore.  &lt;/li&gt;
    &lt;li&gt;Implement more advanced code generation caching.  &lt;/li&gt;
    &lt;li&gt;Possibly implement /code generate a helper methods on media types such as "MyImage.GetStream()" that would automatically open and return an IO stream.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h2&gt;Licence&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;This library and code generator is licensed under the terms and conditions defined in the GNU Public License&lt;/strong&gt;. You are free to use it for non-commercial purposes. If you are going to use any part of it in a commercial application, contact me and we can work something out.  You may use the code generated output of Slink in both commercial and non-commercial applications.&lt;/p&gt;
&lt;h3&gt;Special Thanks&lt;/h3&gt;
&lt;p&gt;Special thanks and acknowledgements go out to &lt;a target="_blank" href="http://www.codeproject.com/tools/TaHoGen.asp"&gt;Philip Laureano&lt;/a&gt; for building his open source &lt;a target="_blank" href="http://www.codeproject.com/tools/TaHoGen.asp"&gt;TaHoGen&lt;/a&gt; code template generator.  Without it, Slinks would not exist.&lt;/p&gt;&lt;img src="http://bchavez.bitarmory.com/aggbug/24.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Brian Chavez</dc:creator>
            <guid>http://bchavez.bitarmory.com/archive/2007/09/03/slink-framework---strongly-typed-urls-for-asp.net.aspx</guid>
            <pubDate>Mon, 03 Sep 2007 22:15:10 GMT</pubDate>
            <wfw:comment>http://bchavez.bitarmory.com/comments/24.aspx</wfw:comment>
            <comments>http://bchavez.bitarmory.com/archive/2007/09/03/slink-framework---strongly-typed-urls-for-asp.net.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://bchavez.bitarmory.com/comments/commentRss/24.aspx</wfw:commentRss>
            <trackback:ping>http://bchavez.bitarmory.com/services/trackbacks/24.aspx</trackback:ping>
        </item>
    </channel>
</rss>