<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>Web/ASP.NET</title>
        <link>http://ryanfarley.com/blog/category/57.aspx</link>
        <description>Web/ASP.NET</description>
        <language>en-US</language>
        <copyright>Ryan Farley</copyright>
        <managingEditor>ryan.farley@customerfx.com</managingEditor>
        <generator>Subtext Version 1.9.5.177</generator>
        <item>
            <title>Scraping, or Programatically Accessing, a Secure Webpage</title>
            <link>http://ryanfarley.com/blog/archive/2008/08/25/scraping-or-programatically-accessing-a-secure-webpage.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbff514a00000000b700000001000900&lt;/div&gt;There are many secure websites out there that provide useful information but do not have a public API to access it's data. A prime example of this is the LinkedIn website. You might love to gather some info from LinkedIn, but their promise to deliver a public API has yet to come to fruition. The problem is, the pages with all the good data are secure, requiring the user to log in before accessing these pages. Let's say we want to scrape this data from these pages programatically? We need to authenticate to access these pages. We can do that by reusing the authentication cookie from the site that we receive when we log in with a browser. &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt; I've mentioned LinkedIn as an example of a secure site to programatically access data from. It's actually a violation of LinkedIn's user agreement to scrape data from it's site. The techniques here apply to any form-based authenticated website, built on ASP.NET or anything else.&lt;/blockquote&gt; &lt;br /&gt;
Before we move on with this, I wanted to state a few assumptions with the approach I'll be showing here:&lt;br /&gt;
&lt;ol&gt;
    &lt;li&gt;You already have browser-based access to the secure pages (meaning you have a user account).&lt;/li&gt;
    &lt;li&gt;You're OK to use &lt;span style="font-style: italic;"&gt;your own&lt;/span&gt; authentication cookie to access the secure pages without violating some site agreement. Doing this sort of thing on a site that prohibits it can get you banned from the site. Remember, you'll be using something that can link these requests back to your own user account.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
When you visit a webpage that requires some sort of form-based authentication, usually there is an authentication token stored in a cookie. This certainly is the case with any ASP.NET site using Forms Authentication and is the case with LinkedIn as well as about any other similar site out there. Even if it isn't a persistent cookie, and is only active for the session, there still is a cookie. This cookie is passed back to the website in the request header each time a page is accessed. We can sniff out the data for that cookie using &lt;a href="http://getfirebug.com/" target="_blank"&gt;Firebug&lt;/a&gt; (the awesomely-awesome Firefox addon), or using &lt;a href="http://www.fiddlertool.com/" target="_blank"&gt;Fiddler&lt;/a&gt; for IE.&lt;br /&gt;
&lt;br /&gt;
Using Firebug, we can access the secure page and take a look at the cookie value in the header. For my example, I'll be using a sample ASP.NET site using forms authentication, but this all works the same for non-ASP.NET sites too.&lt;br /&gt;
&lt;br /&gt;
&lt;img height="434" width="495" alt="" src="http://ryanfarley.com/images/ryanfarley_com/blog/FormsAuth_Cookie.jpg" /&gt;&lt;br /&gt;
&lt;br /&gt;
If you're using Fiddler, just access the page using IE and then you'll see the cookie data by going to the Headers section under the Session Inspector. &lt;br /&gt;
&lt;br /&gt;
For an ASP.NET site using forms authentication, the authentication token name is indicated in the "name" attribute of the forms key in the authentication section of the web.config. By default that name is ".ASPXAUTH", but you won't know what that name is, or the site might not even be an ASP.NET site. That is OK. You can usually pick out the authentication token in the cookie data, or just use the entire cookie.&lt;br /&gt;
&lt;br /&gt;
Now, using that cookie, we can use the following code to access the secure webpage:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; System.Net;&lt;br /&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color: Green;"&gt;//...&lt;br /&gt;&lt;/span&gt; &lt;br /&gt; &lt;br /&gt;&lt;span style="color: Green;"&gt;//grab cookie authentication token from Firebug/Fiddler and add in here&lt;br /&gt;&lt;/span&gt;&lt;span style="color: Blue;"&gt;string&lt;/span&gt; cookiedata &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;".ASPXAUTH=FB8ADA49D4BFE4EF531A4539D0B74CCA6762F9CC6F62C8E..."&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;HttpWebRequest request &lt;span style="color: Navy;"&gt;=&lt;/span&gt; HttpWebRequest.Create(&lt;span style="color: rgb(0, 128, 128);"&gt;"http://somesite.com/securepage.aspx"&lt;/span&gt;) as HttpWebRequest;&lt;br /&gt;&lt;span style="color: Green;"&gt;//set the user agent so it looks like IE to not raise suspicion &lt;br /&gt;&lt;/span&gt;request.UserAgent &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"&lt;/span&gt;;&lt;br /&gt;request.Method &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"GET"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: Green;"&gt;//set the cookie in the request header&lt;br /&gt;&lt;/span&gt;request.Headers.Add(&lt;span style="color: rgb(0, 128, 128);"&gt;"Cookie"&lt;/span&gt;, cookiedata);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Green;"&gt;//get the response from the server&lt;br /&gt;&lt;/span&gt;HttpWebResponse response &lt;span style="color: Navy;"&gt;=&lt;/span&gt; (HttpWebResponse)request.GetResponse();&lt;br /&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; (Stream stream &lt;span style="color: Navy;"&gt;=&lt;/span&gt; response.GetResponseStream())&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: Blue;"&gt;using&lt;/span&gt; (StreamReader reader &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; StreamReader(stream))&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: Blue;"&gt;string&lt;/span&gt; pagedata &lt;span style="color: Navy;"&gt;=&lt;/span&gt; reader.ReadToEnd();&lt;br /&gt;        &lt;span style="color: Green;"&gt;//now we can scrape the contents of the secure page as needed&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: Green;"&gt;//since the page contents is now stored in our pagedata string&lt;br /&gt;&lt;/span&gt;    }&lt;br /&gt;}&lt;br /&gt;response.Close();&lt;/pre&gt;
&lt;br /&gt;
One thing to point out here, since we're passing the entire contents of the cookie, I'm just adding that as a whole to the request header instead of adding each cookie element to the request.Cookie container. &lt;br /&gt;
&lt;br /&gt;
If I wire that up in a form, we'll quickly see the secure page since the site will see the authentication token in the cookie sent in the page header and will not redirect us to the login page.&lt;br /&gt;
&lt;br /&gt;
&lt;img height="212" width="515" src="http://ryanfarley.com/images/ryanfarley_com/blog/FormsAuth_ReqPage.jpg" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
Not bad. We can now scrape any data we'd like from the secure page contents. Just to point out, we're not just limited to reading the data. We can also send form data back to the site as a POST on secure pages as well.&lt;img src="http://ryanfarley.com/blog/aggbug/38133.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2008/08/25/scraping-or-programatically-accessing-a-secure-webpage.aspx</guid>
            <pubDate>Tue, 26 Aug 2008 06:07:01 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2008/08/25/scraping-or-programatically-accessing-a-secure-webpage.aspx#feedback</comments>
            <slash:comments>34</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/38133.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/38133.aspx</trackback:ping>
        </item>
        <item>
            <title>Why I Am No Longer Supporting IE6</title>
            <link>http://ryanfarley.com/blog/archive/2008/08/18/why-i-am-no-longer-supporting-ie6.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbff4d3a00000000b700000001000800&lt;/div&gt;In the recent &lt;a href="http://ryanfarley.com/blog/archive/2008/07/25/the-relaunch-of-ryanfarley.com-and-how-twitter-helped-my-career.aspx"&gt;relaunch of this site&lt;/a&gt;, I created a new custom skin for Subtext. Since this is just a personal site, I threw things together fairly quickly, testing along the way with Firefox3 and IE7. Once I was getting closer to complete, I took a look at my new site in all the usual browsers, including IE6. Ugh, it looked terrible. I gave it some thought and made some decisions about supporting IE6. I'm not going to support it. Not on this site and not on others that I have a say in. I'm not talking about leaving my site unusable for IE6 users - they just won't get as good of an experience. I'm not alone with this decision. Read on to see why I am no longer supporting IE6.&lt;br /&gt;
&lt;br /&gt;
As I mentioned above, I'm not talking about leaving the site inaccessible or unusable for IE6 users. I completely understand that there are many corporate machines that are held back by IT restrictions &amp;amp; policies where IE6 is the only choice. I'm not talking about making my sites inaccessible to these users, or even those who just don't upgrade due to their own ignorance. However, I'm just going to choose to no longer dumb-down my sites to support them. They'll be able to access my sites. They just won't have as good of an experience.&lt;br /&gt;
&lt;br /&gt;
I know that this sort of decision cannot be made about all sites. It's a smart idea for major public sites to be able to fall back to IE6 support if needed. Most of my sites are focused on the developer, either in the form of a blog or a community site. Knowing that this is my audience I feel completely justified in not supporting IE6 and focusing only on more current browsers. When redesigning my new site, I intentionally used PNG images with transparencies among other things that I knew wouldn't look cool for IE6 users. I'm OK with that. I don't think that is me being "elitist" or anything, again the audience for this site is developers - although there is still a disturbing percentage of the traffic that is using IE6.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;Letting IE6 Users Know What They Are Missing&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
OK. As I mentioned, IE6 users can still read everything on this site. Things are way too spaced apart and many dividers are not where they are supposed to be, but things are still quite readable. I don't want these users thinking that this is how my site is &lt;span style="font-weight: bold; font-style: italic;"&gt;supposed&lt;/span&gt; to look. Come on, that would be embarrassing. Instead of fixing it however, I've decided to add a little item to the header area of the page to let them know that "I know the site looks like crap, it's because of &lt;span style="font-style: italic;"&gt;your&lt;/span&gt; browser".&lt;br /&gt;
&lt;br /&gt;
&lt;img height="387" width="576" alt="" src="http://ryanfarley.com/images/ryanfarley_com/blog/RyanFarley-NoIE6.jpg" /&gt;&lt;br /&gt;
&lt;br /&gt;
Users who come to this site using IE6 will see the above and can come read more on this post. I'm completely on-board with Mad Kristensen's post &lt;a target="_blank" href="http://blog.madskristensen.dk/post/Create-better-experiences-for-your-visitors.aspx"&gt;creating better experiences for your visitors&lt;/a&gt;, I'll just be focusing on creating a better experience for the users with more modern browsers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;What's Wrong With IE6?&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
This is a development blog, so I shouldn't have to explain this to anyone here, but off top of my head (this is a small part of a very large list):&lt;br /&gt;
&lt;ol&gt;
    &lt;li&gt;Lack of support for current standards for HTML markup, CSS, etc&lt;/li&gt;
    &lt;li&gt;Support for non-standard features not compatible with other browsers&lt;/li&gt;
    &lt;li&gt;No PNG transparency support&lt;/li&gt;
    &lt;li&gt;Released in 2001, we've completely moved beyond everything about IE6. This is a browser that PC World rated &lt;a href="http://www.pcworld.com/article/125772-3/the_25_worst_tech_products_of_all_time.html" target="_blank"&gt;one of the worst tech products of all time&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;How Long Will Developers Have to Continue Supporting IE6?&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
At some point, we'll all have to be OK with putting and end to adding support for IE6 in our sites. 37Signals &lt;a target="_blank" href="http://37signals.blogs.com/products/2008/07/basecamp-phasin.html"&gt;dropped support for IE6 in their products&lt;/a&gt; last Friday, Aug 15th. I've decided that for my sites, the time is now as well.&lt;br /&gt;
&lt;br /&gt;
If you'd like to end supporting IE6 in your sites as well, all you have to do is focus on developing for newer browsers. Let the site suck for IE6 users IMO. To let them know that "you know it sucks and they should upgrade", &lt;a href="http://www.savethedevelopers.org/" target="_blank"&gt;SaveTheDevelopers.org&lt;/a&gt; has a nice little Javascript you can add to your site to drop down a little message on the top of your pages that encourages the user to upgrade their browser to IE7 or install Firefox, Opera, Safari, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;a target="_blank" href="http://www.savethedevelopers.org/"&gt;&lt;img height="73" width="316" border="0" alt="" src="http://ryanfarley.com/images/ryanfarley_com/blog/SaveTheDevelopers.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Say No To IE 6!&lt;/span&gt;&lt;br style="font-style: italic;" /&gt;
&lt;br style="font-style: italic;" /&gt;
&lt;span style="font-style: italic;"&gt; Our current campaign focuses on assisting users in upgrading their Internet Explorer 6 web browser. This campaign will result in former IE 6 users having a more enjoyable experience on the web while (hopefully) creating a less stressful and complicated environment for web developers by hastening the retirement of an outdated browser.&lt;/span&gt; &lt;/blockquote&gt; &lt;br /&gt;
OK. Enough for me. I'm sold. No more support for IE6 from me. IE6 users, sorry. You can still use my sites, they just won't look as nice. As a consolation prize, you will at least get to see my cool "Eek IE6!" message.&lt;img src="http://ryanfarley.com/blog/aggbug/38132.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2008/08/18/why-i-am-no-longer-supporting-ie6.aspx</guid>
            <pubDate>Tue, 19 Aug 2008 01:17:09 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2008/08/18/why-i-am-no-longer-supporting-ie6.aspx#feedback</comments>
            <slash:comments>52</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/38132.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/38132.aspx</trackback:ping>
        </item>
        <item>
            <title>More on Device Filtering With ASP.NET Server Control Properties</title>
            <link>http://ryanfarley.com/blog/archive/2008/08/14/more-on-device-filtering-with-asp.net-server-control-properties.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbffd52a000000000bf4000001000100&lt;/div&gt;&lt;a href="http://ryanfarley.com/blog/archive/2008/08/14/set-browser-specific-asp.net-server-control-properties-and-taking-an.aspx"&gt;I posted yesterday&lt;/a&gt; about setting ASP.NET Browser control properties differently for different browsers by using device filtering syntax for setting the properties. I've received some questions via e-mail about that post so I wanted to follow up on some additional things I've found on this topic.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="link"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;See this first:&lt;/span&gt; &lt;a href="http://ryanfarley.com/blog/archive/2008/08/14/set-browser-specific-asp.net-server-control-properties-and-taking-an.aspx"&gt;Set Browser Specific ASP.NET Server Control Properties and Taking an ASP.NET Site Offline&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;1) This can only be done declaratively&lt;/span&gt;. If you need to do this in the code-behind you'll need to use Request.Browser. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: Blue;"&gt;switch&lt;/span&gt; (Request.Browser.Browser.ToLower())&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: Blue;"&gt;case&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"ie"&lt;/span&gt;:&lt;br /&gt;        &lt;span style="color: Blue;"&gt;if&lt;/span&gt; (Request.Browser.MajorVersion == 7)&lt;br /&gt;            labelText.Text &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Hello IE7!"&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;else&lt;/span&gt; &lt;br /&gt;            labelText.Text &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Hello IE (time to upgrade!)"&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;break&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: Blue;"&gt;case&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"firefox"&lt;/span&gt;:&lt;br /&gt;        labelText.Text &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Hello Firefox"&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;break&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: Blue;"&gt;default&lt;/span&gt;:&lt;br /&gt;        labelText.Text &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Hello other browser"&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;break&lt;/span&gt;;&lt;br /&gt;}&lt;/pre&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;2) There is no designer support.&lt;/span&gt; Don't expect to see this stuff in the intellisense. It won't be there, but it will work.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;3) Not just for simple properties.&lt;/span&gt; This device filtering technique worked with every property I tried it with. In fact, it even worked in other unexpected ways as well, such as with templated controls. Take a look at the following example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;asp:Menu runat=&lt;span style="color: rgb(0, 128, 128);"&gt;"server"&lt;/span&gt; id=&lt;span style="color: rgb(0, 128, 128);"&gt;"myMenu"&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;ie:Items&amp;gt;&lt;br /&gt;       &amp;lt;asp:MenuItem Text=&lt;span style="color: rgb(0, 128, 128);"&gt;"IE Item"&lt;/span&gt; &lt;span style="color: Navy;"&gt;/&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/ie:Items&amp;gt;&lt;br /&gt;    &lt;br /&gt;    &amp;lt;mozilla:Items&amp;gt;&lt;br /&gt;       &amp;lt;asp:MenuItem Text=&lt;span style="color: rgb(0, 128, 128);"&gt;"Firefox Item"&lt;/span&gt; &lt;span style="color: Navy;"&gt;/&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/mozilla:Items&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;Items&amp;gt;&lt;br /&gt;        &amp;lt;asp:MenuItem Text=&lt;span style="color: rgb(0, 128, 128);"&gt;"Other Item"&lt;/span&gt; &lt;span style="color: Navy;"&gt;/&lt;/span&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/Items&amp;gt;&lt;br /&gt;&amp;lt;/asp:Menu&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
Now that is pretty cool.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;4) How it works.&lt;/span&gt; This didn't take too long to work out. A little bit of digging quickly showed how this all comes together because it works just how you would probably guess. The biggest question is "&lt;span style="font-style: italic; font-weight: bold;"&gt;how do you know what device values you can use for filtering?&lt;/span&gt;". In the .NET Framework directory you'll find some config files showing how to behave and render controls for different types of browsers. &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers&lt;/pre&gt;
&lt;br /&gt;
In that folder you'll see several config files named things like "ie.browser", "mozilla.browser", "safari.browser", "palm.browser", etc. In each of these files there are several "browser" elements, each with an ID. These ID values are what can be used to declaratively filter server control properties for the specific devices. Mind you, it's not just the names of the files, but the browser ID values contained inside. This means that you can get &lt;span style="font-style: italic;"&gt;very&lt;/span&gt; specific about the targeted browser for a property value. Instead of just specifying "ie", you could use any of the following "ie", "ie5", "ie5to9", "ieaol", "ie4" and many many more. Also, you can edit these, or add an App_Browsers folder to your propject and place a new file named "something.browser" in it to define your specific browser capabilities.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;5) It works with directives too!&lt;/span&gt; This was the one that blew me away. You can use it on directives as well! That means, control directives (to modify properties, attributes, templates, etc), page directives (to modify CodePage, MasterPageFile, Culture, Theme, etc), and master page directives (to modify CodeFile, Viewstate, etc). &lt;span style="font-style: italic;"&gt;W-w-what?&lt;/span&gt; The following will set a separate master page for IE and Firefox and a third for all other browsers:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;%@ Page Language=&lt;span style="color: rgb(0, 128, 128);"&gt;"C#"&lt;/span&gt; &lt;br /&gt;    ie:MasterPageFile=&lt;span style="color: rgb(0, 128, 128);"&gt;"~/MasterPageIE.master"&lt;/span&gt; &lt;br /&gt;    mozilla:MasterPageFile=&lt;span style="color: rgb(0, 128, 128);"&gt;"~/MasterPageFirefox.master"&lt;/span&gt; &lt;br /&gt;    MasterPageFile=&lt;span style="color: rgb(0, 128, 128);"&gt;"~/MasterPageGeneric.master"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: Navy;"&gt;%&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
Freaky, I know.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;6) Why use this?&lt;/span&gt; There are a lot of uses for device filtering with server control properties. Consider this. You have a simple page with a welcome label. It's a simple page so you don't really need a separate mobile version of the page. You could shorten that text easily for anyone on a PocketPC IE or Palm browser to account for the limited screen real estate. &lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;7) You can disallow the use of device filtering in your custom controls if you want.&lt;/span&gt; If you build your own control and you &lt;span style="font-style: italic;"&gt;don't&lt;/span&gt; want the consuming developer to be able to use device filtering with it's properties, you can mark the class with the &lt;span style="font-family: Courier New;"&gt;Filterable(false)&lt;/span&gt; attribute and it will ignore the device specific properties that are set for the control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Well, that is about all I know. I'm still just trying to cope with the fact that this has been there since ASP.NET 2.0 and I am just finding out about it now. Apparently, I'm not the only one since it was difficult to track down details on this.&lt;img src="http://ryanfarley.com/blog/aggbug/38131.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2008/08/14/more-on-device-filtering-with-asp.net-server-control-properties.aspx</guid>
            <pubDate>Thu, 14 Aug 2008 19:13:57 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2008/08/14/more-on-device-filtering-with-asp.net-server-control-properties.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/38131.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/38131.aspx</trackback:ping>
        </item>
        <item>
            <title>Set Browser Specific ASP.NET Server Control Properties and Taking an ASP.NET Site Offline</title>
            <link>http://ryanfarley.com/blog/archive/2008/08/14/set-browser-specific-asp.net-server-control-properties-and-taking-an.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbffc72a0000000009f4000001000100&lt;/div&gt;Isn't it great when you work with a tool day after day and you thought you knew everything there was to know about it? Then find out something that has been there for a long time that you somehow missed? Here's two things that have been in ASP.NET since version 2.0 that I somehow missed until just recently.&lt;br /&gt;
&lt;br /&gt;
...as if there are only 2? Hehe. I am sure there are many more, but I was actually surprised when I came across these items. They're simple enough that I could not believe that I missed them before. I'm sure that I'm not the only one who missed these items. The fact that I hadn't heard about them indicates that they've not been blogged about heavily or that obvious in the docs (if at all?).&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3" style="font-weight: bold;"&gt;Setting Server Control Properties Based on Target Browser&lt;/font&gt;&lt;br /&gt;
This one was surprising. I came across this one on &lt;a href="http://weblogs.asp.net/johnkatsiotis/archive/2008/08/12/asp-net-browsers-filter.aspx" target="_blank"&gt;John Katsiotis' Web Dev &amp;amp; Stuff&lt;/a&gt;. The fact that I've written code so many times to accomplish this, when it's apparently been built in since version 2.0 just kills me. The properties of server controls will let you specify a browser filter to apply the property value for. That is, you can set a different value for a property for IE than for Firefox - and for anything else. I didn't try all properties, but I did try many that would matter, such as Text and OnClientClick etc, and they do work. Take a look at the following markup:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;&lt;span style="color: rgb(128, 0, 0);"&gt;asp:Label&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; runat=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"server"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; ID=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"labelText"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    ie:Text=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"This is IE text"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    mozilla:Text=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"This is Firefox text"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    Text=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"This is general text"&lt;/span&gt; &lt;br /&gt;/&amp;gt;  &lt;br /&gt;&lt;br /&gt;&amp;lt;&lt;span style="color: rgb(128, 0, 0);"&gt;br&lt;/span&gt; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;&lt;span style="color: rgb(128, 0, 0);"&gt;asp:Button&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; runat=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"server"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; ID=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"buttonText"&lt;/span&gt; &lt;br /&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;   ie:Text=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"IE Button"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    ie:OnClientClick=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"javascript:alert('Hello IE!');"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    mozilla:Text=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"FF Button"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    mozilla:OnClientClick=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"javascript:alert('Hello Firefox!');"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    Text=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"General Button"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    OnClientClick=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;"javascript:alert('Hello everyone else!');"&lt;/span&gt; &lt;br /&gt;/&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;br /&gt;
Notice the "ie:" and "mozilla:" prefixes on the Text and OnClientClick properties. The results? Take a look. The following was the result in Firefox:&lt;br /&gt;
&lt;br /&gt;
&lt;img height="282" width="530" alt="" src="/images/ryanfarley_com/blog/BrowserProperties-FF.png" /&gt;&lt;br /&gt;
&lt;br /&gt;
In Internet Explorer:&lt;br /&gt;
&lt;br /&gt;
&lt;img height="282" width="530" alt="" src="/images/ryanfarley_com/blog/BrowserProperties-IE.png" /&gt;&lt;br /&gt;
&lt;br /&gt;
In Opera (or anything other than IE or Firefox since I've defined properties for those)&lt;br /&gt;
&lt;br /&gt;
&lt;img height="282" width="530" alt="" src="/images/ryanfarley_com/blog/BrowserProperties-General.png" /&gt;&lt;br /&gt;
&lt;br /&gt;
Wow. Pretty cool. Now, I am not saying that this will apply in all cases. It doesn't seem to differentiate between IE7 and IE6, so there are some big limitations. However, this is quite a cool trick and one that will without question come in handy.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; I posted a follow up that shows a lot more of the capabilities of using these device filters to target specific browsers in ASP.NET.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="link"&gt;See &lt;a href="http://ryanfarley.com/blog/archive/2008/08/14/more-on-device-filtering-with-asp.net-server-control-properties.aspx"&gt;More on Device Filtering With ASP.NET Server Control Properties&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;Taking an ASP.NET Site Offline with a Message&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
This was another one that I was literally beside myself that I didn't know this one before. A fellow business partner of mine named James Sutton mentioned this one to me. This one's been around since ASP.NET 2.0 as well. If you have an ASP.NET web application site, and you place a text file named "app_offline.htm" in the root of the site, &lt;span style="font-weight: bold; font-style: italic;"&gt;all requests to that website will redirect to that app_offline.htm file&lt;/span&gt;. Basically, if you need to take an entire ASP.NET site offline, you can place some nice message in that file. Then, any new requests to a URL, any URL, in that website will redirect to that file allowing you to do maintenance to the site, upgrades, or whatever. It is not really a redirect though. ASP.NET essentially shuts down the site, unloads it from the server, and stops processing any requests to that site. That is, until you delete the app_offline.htm file - then things will continue as normal and your ASP.NET site will load up and start serving requests again.  &lt;br /&gt;
&lt;br /&gt;
A super-cool side effect of this is that any files that are locked by the site, such as a database or other resources, are freed since the application domain has been unloaded from the server. This allows you to remove the locks from those files and replace them, without the need to do a full IISRESET, taking down other sites on the server. One thing to keep in mind with this file however, make sure you out enough content in it so it is larger than 512 bytes or IE will consider it a 404 and will display the 404 instead of the contents of your app_offline.htm file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I love coming across new tricks like this, but it does make me wonder, why didn't I know about these before?&lt;img src="http://ryanfarley.com/blog/aggbug/38130.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2008/08/14/set-browser-specific-asp.net-server-control-properties-and-taking-an.aspx</guid>
            <pubDate>Thu, 14 Aug 2008 07:00:18 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2008/08/14/set-browser-specific-asp.net-server-control-properties-and-taking-an.aspx#feedback</comments>
            <slash:comments>13</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/38130.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/38130.aspx</trackback:ping>
        </item>
        <item>
            <title>Adding Calendar Items to Outlook or Other Calendar App from a Webpage via iCalendar</title>
            <link>http://ryanfarley.com/blog/archive/2008/08/08/adding-calendar-items-from-a-webpage-via-icalendar.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbff300c00000000b700000001000700&lt;/div&gt;If you have a website that maintains a list of events for users, it is a great idea to allow users to selectively add those events to their own calendar. Using automation from a website with something like Outlook is a bad idea. It would be blocked by the browser's security and your users might use something else for their calendar. Fortunately, many main-stream (most?) calendar applications, such as Outlook, Windows Calendar on Vista, and a whole lot more, support the iCalendar specification. This makes adding items from your applications a breeze.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;The iCalendar Specification&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
The iCalendar spec (see &lt;a target="_blank" href="http://tools.ietf.org/html/rfc2445"&gt;RFC 2445&lt;/a&gt;) was created to extend an earlier created vCalendar spec. This spec basically provides a universally accepted way to represent a calendar item in a file, or really, as text. An iCalendar can represent some single generic calendar item, or an Event, To-Do, Journal item, and can even include free/busy schedule information. We are going to focus here on including only a single event in our iCalendar data, although it can also represent multiple items all within the same iCalendar. When expressed as a file, the iCalendar data will typically have an "ics" extension, but really it is just text. It also has a MIME type of "text/calendar"&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;Scenario&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
For our scenario, we'll assume we have a website with events on it. For any of these events, we want to allow the user to be able to selectively add an event to their own local calendar. On the display of an event on our website, we'll provide a link that the user can click to add the event to their calendar. Here's a sample of a website that I've used this on to give you an idea:&lt;br /&gt;
&lt;br /&gt;
&lt;img height="303" width="439" src="/images/ryanfarley_com/blog/CalendarSample.jpg" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
The user clicks that link and we get some &lt;a href="http://www.hanselman.com/blog/ILikeCakeCakemailNinjasOnFireAndOtherAnecdotes.aspx" target="_blank"&gt;jazz hands&lt;/a&gt; and it is added to the user's calendar. Let's take a look at how it all works.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;The iCalendar Class&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
As I mentioned before, the iCalendar data is just text. The thing about it is, it is &lt;span style="font-weight: bold;"&gt;ugly&lt;/span&gt; text. I don't like ugly text. I want to write it once and then forget it ever existed. So, I created a class that does all the ugly text for me to use whenever I need. If you're really wanting to see more of this ugly text then you and the rest of your zombie friends can go nicely over to the RFC and read all you want.&lt;br /&gt;
&lt;br /&gt;
Here's my class:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;"&gt;namespace&lt;/span&gt; RF.Events&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: Blue;"&gt;public&lt;/span&gt; enum PriorityLevel : &lt;span style="color: Blue;"&gt;int&lt;/span&gt;&lt;br /&gt;    {&lt;br /&gt;        Normal &lt;span style="color: Navy;"&gt;=&lt;/span&gt; 5,&lt;br /&gt;        High &lt;span style="color: Navy;"&gt;=&lt;/span&gt; 1,&lt;br /&gt;        Low &lt;span style="color: Navy;"&gt;=&lt;/span&gt; 9&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;class&lt;/span&gt; Event&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: Blue;"&gt;private&lt;/span&gt; &lt;span style="color: Blue;"&gt;const&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; _DATEFORMAT &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"yyyyMMdd\\THHmmss\\Z"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; Event() { }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; DateTime StartTime;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; DateTime EndTime;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; Location &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt;.Empty;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; Title &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt;.Empty;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; Description &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt;.Empty;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;bool&lt;/span&gt; UseAlarm &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; PriorityLevel Priority &lt;span style="color: Navy;"&gt;=&lt;/span&gt; PriorityLevel.Normal;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; Category &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt;.Empty;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;override&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; ToString()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: Blue;"&gt;return&lt;/span&gt; Output;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; Output&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: Blue;"&gt;get&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                StringBuilder sb &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; StringBuilder();&lt;br /&gt;&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"BEGIN:VEVENT\n\n"&lt;/span&gt;);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"DTSTART:"&lt;/span&gt;);&lt;br /&gt;                sb.Append(StartTime.ToUniversalTime().ToString(_DATEFORMAT));&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"\nDTEND:"&lt;/span&gt;);&lt;br /&gt;                sb.Append(EndTime.ToUniversalTime().ToString(_DATEFORMAT));&lt;br /&gt;&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"\nLOCATION:"&lt;/span&gt;);&lt;br /&gt;                sb.Append(Location);&lt;br /&gt;&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"\nCATEGORIES:"&lt;/span&gt;);&lt;br /&gt;                sb.Append(Category);&lt;br /&gt;&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"\nTRANSP:OPAQUE\n"&lt;/span&gt;);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"SEQUENCE:0\n"&lt;/span&gt;);&lt;br /&gt;                sb.AppendFormat(&lt;span style="color: rgb(0, 128, 128);"&gt;"UID:RFCALITEM{0}\n"&lt;/span&gt;, DateTime.Now.Ticks);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"DTSTAMP:"&lt;/span&gt;);&lt;br /&gt;                sb.Append(StartTime.ToUniversalTime().ToString(_DATEFORMAT));&lt;br /&gt;&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"\nDESCRIPTION:"&lt;/span&gt;);&lt;br /&gt;                sb.Append(Description);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"\nSUMMARY:"&lt;/span&gt;);&lt;br /&gt;                sb.Append(Title);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"\n\nPRIORITY:"&lt;/span&gt;);&lt;br /&gt;                sb.Append((&lt;span style="color: Blue;"&gt;int&lt;/span&gt;)Priority);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"\nCLASS:PUBLIC\n"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: Blue;"&gt;if&lt;/span&gt; (UseAlarm)&lt;br /&gt;                {&lt;br /&gt;                    sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"BEGIN:VALARM\n"&lt;/span&gt;);&lt;br /&gt;                    sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"TRIGGER:PT15M\n"&lt;/span&gt;);&lt;br /&gt;                    sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"ACTION:DISPLAY\n"&lt;/span&gt;);&lt;br /&gt;                    sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"DESCRIPTION:Reminder\n"&lt;/span&gt;);&lt;br /&gt;                    sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"PRIORITY:5\n"&lt;/span&gt;);&lt;br /&gt;                    sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"END:VALARM\n"&lt;/span&gt;);&lt;br /&gt;                }&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"END:VEVENT\n"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: Blue;"&gt;return&lt;/span&gt; sb.ToString();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;class&lt;/span&gt; iCalendar&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; iCalendar()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: Blue;"&gt;this&lt;/span&gt;.Events &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; List&amp;lt;Event&amp;gt;();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; List&amp;lt;Event&amp;gt; Events;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;override&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; ToString()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: Blue;"&gt;return&lt;/span&gt; &lt;span style="color: Blue;"&gt;this&lt;/span&gt;.Output;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;string&lt;/span&gt; Output&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: Blue;"&gt;get&lt;/span&gt; &lt;br /&gt;            { &lt;br /&gt;                StringBuilder sb &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; StringBuilder();&lt;br /&gt;&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"BEGIN:VCALENDAR\n"&lt;/span&gt;);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"PRODID:-//RyanFarley.com//iCalendar Sample MIMEDIR//EN\n"&lt;/span&gt;);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"VERSION:2.0\n"&lt;/span&gt;);&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"METHOD:PUBLISH\n"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: Blue;"&gt;foreach&lt;/span&gt; (Event ev &lt;span style="color: Blue;"&gt;in&lt;/span&gt; Events)&lt;br /&gt;                    sb.Append(ev.Output);&lt;br /&gt;&lt;br /&gt;                sb.Append(&lt;span style="color: rgb(0, 128, 128);"&gt;"END:VCALENDAR"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: Blue;"&gt;return&lt;/span&gt; sb.ToString();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;br /&gt;
So, first question. Why the separation of the Event item from the rest of the iCalendar item? We'll get to that. For now, here's how we'll use that class. Let's add it to a handler to send back the iCalendar data in the response. We'll call this handler from the link we provide to the user (Typically we would do something like pass an "event ID" of some kind to it and grab the associated data from a database or something. We'll ignore all that stuff in this example to keep it simple).&lt;br /&gt;
&lt;br /&gt;
Here's our handler code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;%@ WebHandler Language=&lt;span style="color: rgb(0, 128, 128);"&gt;"C#"&lt;/span&gt; Class=&lt;span style="color: rgb(0, 128, 128);"&gt;"CalendarItem"&lt;/span&gt; &lt;span style="color: Navy;"&gt;%&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; System.Web;&lt;br /&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style="color: Blue;"&gt;using&lt;/span&gt; RF.Events;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;class&lt;/span&gt; CalendarItem : IHttpHandler &lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;void&lt;/span&gt; ProcessRequest(HttpContext context) &lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: Green;"&gt;// Set up the Event item first. This would typically come &lt;br /&gt;&lt;/span&gt;        &lt;span style="color: Green;"&gt;// from a database or some object in the application&lt;br /&gt;&lt;/span&gt;        Event ev &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; Event();&lt;br /&gt;        ev.Title &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Some Event"&lt;/span&gt;;&lt;br /&gt;        ev.Description &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"This is a test event. Yeye.\\nKTHXBYE"&lt;/span&gt;;&lt;br /&gt;        ev.Location &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"At ryanfarley.com"&lt;/span&gt;;&lt;br /&gt;        ev.UseAlarm &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;        ev.StartTime &lt;span style="color: Navy;"&gt;=&lt;/span&gt; DateTime.Parse(&lt;span style="color: rgb(0, 128, 128);"&gt;"11/1/2008 8:00:00 AM"&lt;/span&gt;);&lt;br /&gt;        ev.EndTime &lt;span style="color: Navy;"&gt;=&lt;/span&gt; DateTime.Parse(&lt;span style="color: rgb(0, 128, 128);"&gt;"11/1/2008 10:00:00 AM"&lt;/span&gt;);&lt;br /&gt;        ev.Priority &lt;span style="color: Navy;"&gt;=&lt;/span&gt; PriorityLevel.Normal;&lt;br /&gt;        ev.Category &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Test Category"&lt;/span&gt;;&lt;br /&gt;        &lt;br /&gt;        &lt;span style="color: Green;"&gt;// Now add the event to an iCalendar&lt;br /&gt;&lt;/span&gt;        iCalendar ical &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; iCalendar();&lt;br /&gt;        ical.Events.Add(ev);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Green;"&gt;// Set the content-type of the response and file name&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: Green;"&gt;// so Windows knows how to handle the response.&lt;br /&gt;&lt;/span&gt;        context.Response.ContentType &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"text/calendar"&lt;/span&gt;;&lt;br /&gt;        context.Response.AddHeader(&lt;span style="color: rgb(0, 128, 128);"&gt;"content-disposition"&lt;/span&gt;, &lt;span style="color: rgb(0, 128, 128);"&gt;"inline;filename=CalendarEvent.ics"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Green;"&gt;// Write the bytes of the iCalendar item output to the resonse stream&lt;br /&gt;&lt;/span&gt;        context.Response.BinaryWrite(&lt;span style="color: Blue;"&gt;new&lt;/span&gt; System.Text.ASCIIEncoding().GetBytes(ical.Output));&lt;br /&gt;        context.Response.End();&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    &lt;span style="color: Blue;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;"&gt;bool&lt;/span&gt; IsReusable &lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: Blue;"&gt;get&lt;/span&gt; { &lt;span style="color: Blue;"&gt;return&lt;/span&gt; &lt;span style="color: Blue;"&gt;false&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;br /&gt;
If we add that as a hyperlink on a webpage, like this:&lt;br /&gt;
&lt;br /&gt;
&lt;img height="164" width="302" src="/images/ryanfarley_com/blog/CalendarSample2.jpg" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
The user can click it (this is where we get the jazz hands) and they are prompted with this:&lt;br /&gt;
&lt;br /&gt;
&lt;img height="326" width="425" src="/images/ryanfarley_com/blog/CalendarSample3.jpg" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Of course, here they click OK and they are presented with some sort of dialog from whatever app is associated with ics files. On my machine that is Outlook, so I get this:&lt;br /&gt;
&lt;br /&gt;
&lt;img height="433" width="576" src="/images/ryanfarley_com/blog/CalendarSample4.jpg" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
Cool. The user clicks the Save &amp;amp; Close and it now appears on their calendar. We're not just limited to do this from a webpage either. We could just as easily save the &lt;span style="font-family: Courier New;"&gt;iCalendar.Output&lt;/span&gt; to a file and Process.Start it to open it for the user if we're in a Windows app. Or attach it to an e-mail to a user, similar to services like WebEx, GotoMeeting, and other services that send you an e-mail with an iCalendar file attached.&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;Adding Multiple Events to Create an iCalendar Feed&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
Now, back to that separation of the Event from the iCalendar class. Why is that? The iCalendar spec indicates that an iCalendar can have one, or multiple events in it. If you've ever added an iCalendar feed to Outlook from your Google Calendar or TripIt, etc, this feed is not an RSS feed or something like that. It is a big long iCalendar file containing multiple events in it. We can create the same with the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;        &lt;span style="color: Green;"&gt;// Create the iCalendar&lt;br /&gt;&lt;/span&gt;        iCalendar ical &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; iCalendar();&lt;br /&gt;        &lt;br /&gt;        &lt;span style="color: Green;"&gt;// Add the first event and add it to the iCalendar&lt;br /&gt;&lt;/span&gt;        Event ev &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; Event();&lt;br /&gt;        ev.Title &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Some Event #1"&lt;/span&gt;;&lt;br /&gt;        ev.Description &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"This is a test event #1. Yeye.\\nKTHXBYE"&lt;/span&gt;;&lt;br /&gt;        ev.Location &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"At ryanfarley.com"&lt;/span&gt;;&lt;br /&gt;        ev.UseAlarm &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;        ev.StartTime &lt;span style="color: Navy;"&gt;=&lt;/span&gt; DateTime.Parse(&lt;span style="color: rgb(0, 128, 128);"&gt;"11/1/2008 8:00:00 AM"&lt;/span&gt;);&lt;br /&gt;        ev.EndTime &lt;span style="color: Navy;"&gt;=&lt;/span&gt; DateTime.Parse(&lt;span style="color: rgb(0, 128, 128);"&gt;"11/1/2008 10:00:00 AM"&lt;/span&gt;);&lt;br /&gt;        ev.Priority &lt;span style="color: Navy;"&gt;=&lt;/span&gt; PriorityLevel.Normal;&lt;br /&gt;        ev.Category &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Test Category"&lt;/span&gt;;        &lt;br /&gt;        ical.Events.Add(ev);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Green;"&gt;// Add the second event and add it to the iCalendar&lt;br /&gt;&lt;/span&gt;        ev &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;new&lt;/span&gt; Event();&lt;br /&gt;        ev.Title &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Some Event #2"&lt;/span&gt;;&lt;br /&gt;        ev.Description &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"This is a test event #2. Yeye.\\nKTHXBYE"&lt;/span&gt;;&lt;br /&gt;        ev.Location &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"At ryanfarley.com"&lt;/span&gt;;&lt;br /&gt;        ev.UseAlarm &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;        ev.StartTime &lt;span style="color: Navy;"&gt;=&lt;/span&gt; DateTime.Parse(&lt;span style="color: rgb(0, 128, 128);"&gt;"11/5/2008 8:00:00 AM"&lt;/span&gt;);&lt;br /&gt;        ev.EndTime &lt;span style="color: Navy;"&gt;=&lt;/span&gt; DateTime.Parse(&lt;span style="color: rgb(0, 128, 128);"&gt;"11/5/2008 10:00:00 AM"&lt;/span&gt;);&lt;br /&gt;        ev.Priority &lt;span style="color: Navy;"&gt;=&lt;/span&gt; PriorityLevel.High;&lt;br /&gt;        ev.Category &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"Test Category"&lt;/span&gt;;&lt;br /&gt;        ical.Events.Add(ev);&lt;br /&gt;        &lt;br /&gt;        &lt;span style="color: Green;"&gt;// ...you get the idea&lt;br /&gt;&lt;/span&gt;        &lt;br /&gt;        &lt;span style="color: Green;"&gt;// Now out iCalendar contains multiple events.&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: Green;"&gt;// We can output it all to the response stream.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: Green;"&gt;// Set the content-type of the response and file name&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: Green;"&gt;// so Windows knows how to handle the response.&lt;br /&gt;&lt;/span&gt;        context.Response.ContentType &lt;span style="color: Navy;"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;"text/calendar"&lt;/span&gt;;&lt;br /&gt;        context.Response.AddHeader(&lt;span style="color: rgb(0, 128, 128);"&gt;"content-disposition"&lt;/span&gt;, &lt;span style="color: rgb(0, 128, 128);"&gt;"inline;filename=CalendarEvent.ics"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: Green;"&gt;// Write the bytes of the iCalendar item output to the resonse stream&lt;br /&gt;&lt;/span&gt;        context.Response.BinaryWrite(&lt;span style="color: Blue;"&gt;new&lt;/span&gt; System.Text.ASCIIEncoding().GetBytes(ical.Output));&lt;br /&gt;        context.Response.End();&lt;/pre&gt;
&lt;br /&gt;
What happens now when the user clicks our link? They'll get prompted just as before, but when they click OK to add it, it will add the iCalendar feed as a second calendar in their calendar application. In Outlook it will show as a separate calendar which I can view side-by-side with my existing one or overlay on top of my existing one. In this case we'd also want to include the appropriate 304 response status in case the calendar item hasn't changed so we keep things nice.&lt;br /&gt;
&lt;br /&gt;
So that is it. Not bad work and we've got a reusable class we can use for single item, or complete calendar feeds. Have fun.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="link"&gt;&lt;a target="_blank" href="http://files.farleyzone.com/downloads/code/iCalendar.cs.txt"&gt;Download the iCalendar class&lt;/a&gt;&lt;/div&gt;&lt;img src="http://ryanfarley.com/blog/aggbug/38129.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2008/08/08/adding-calendar-items-from-a-webpage-via-icalendar.aspx</guid>
            <pubDate>Fri, 08 Aug 2008 07:42:43 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2008/08/08/adding-calendar-items-from-a-webpage-via-icalendar.aspx#feedback</comments>
            <slash:comments>23</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/38129.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/38129.aspx</trackback:ping>
        </item>
        <item>
            <title>Must Have .NET Developer Podcasts</title>
            <link>http://ryanfarley.com/blog/archive/2008/07/30/must-have-.net-developer-podcasts.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbffa00b00000000b700000001000300&lt;/div&gt;&lt;div&gt;&lt;img height="97" align="left" width="129" src="http://ryanfarley.com/images/ryanfarley_com/blog/Podcasts-Zune-small.jpg" style="margin-right: 6px;" alt="" /&gt;&lt;a href="http://ryanfarley.com/blog/archive/2008/07/30/becoming-a-better-developer.aspx"&gt;In my last post&lt;/a&gt; I mentioned some of the podcasts that I've been listening to that have inspired me as a .NET developer. I thought it would be a good idea to start a list of all the podcasts that have taken over my Zune lately and some that I am planning on checking out.&lt;/div&gt;
&lt;br clear="all" /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;font size="2"&gt;&lt;span style="font-weight: bold;"&gt;&lt;font size="3"&gt;My Current Favorites&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-weight: bold;" class="link"&gt;&lt;a href="http://herdingcode.com/" target="_blank"&gt;HerdingCode&lt;/a&gt;&lt;/div&gt;
HerdingCode is just a great discussion between &lt;a target="_blank" href="http://weblogs.asp.net/jgalloway"&gt;Jon Gallaway&lt;/a&gt;, &lt;a target="_blank" href="http://odetocode.com/"&gt;K. Scott Allen&lt;/a&gt;, &lt;a target="_blank" href="http://weblogs.asp.net/kdente"&gt;Kevin Dente&lt;/a&gt;, and &lt;a target="_blank" href="http://lazycoder.com/"&gt;Scott Koon&lt;/a&gt; on .NET development topics. I suppose the thing that I really like about it is that it's just down to earth, like you're just listening in on a conversation that they would be having anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-weight: bold;" class="link"&gt;&lt;a href="http://hanselminutes.com/" target="_blank"&gt;Hanselminutes&lt;/a&gt;&lt;/div&gt;
There's likely few that don't know who &lt;a href="http://hanselman.com/" target="_blank"&gt;Scott Hanselman&lt;/a&gt; is. He manages to carry the same passion and energy he shows on his blog to the Hanselminutes show. His co-host is Carl Franklin (see DotNetRocks below) who is always equally as great.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-weight: bold;" class="link"&gt;&lt;a href="http://dotnetrocks.com/" target="_blank"&gt;DotNetRocks&lt;/a&gt;&lt;/div&gt;
DotNetRocks, from &lt;a target="_blank" href="http://www.intellectualhedonism.com/"&gt;Carl Franklin&lt;/a&gt;, has been around for a long time. Carl keeps interesting topics on the show that range from development related, to technology. The show isn't supposed to be a show &lt;span style="font-style: italic;"&gt;about&lt;/span&gt; .NET, but is a show &lt;span style="font-style: italic;"&gt;for&lt;/span&gt; .NET developers. Carl's co-host is &lt;a href="http://www.campbellassociates.ca/blog/" target="_blank"&gt;Richard Campbell&lt;/a&gt;, who always seems to know what he is talking about. &lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-weight: bold;" class="link"&gt;&lt;a href="http://deepfriedbytes.com/" target="_blank"&gt;Deep Fried Bytes&lt;/a&gt;&lt;/div&gt;
Deep Fried Bytes is a show from &lt;a href="http://keithelder.net/blog/" target="_blank"&gt;Keith Elder&lt;/a&gt; and &lt;a href="http://blog.cloudsocket.com/" target="_blank"&gt;Chris "Woody" Woodruff&lt;/a&gt;. This is more of a technology show, but with a strong slant for .NET developers. Very laid back and they've had some great guests.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-weight: bold;" class="link"&gt;&lt;a href="http://altnetpodcast.com/" target="_blank"&gt;ALT.NET Podcast&lt;/a&gt;&lt;/div&gt;
The Alt.NET podcast is a podcast from the &lt;a target="_blank" href="http://altdotnet.org/"&gt;ALT.NET&lt;/a&gt; movement that focuses on improving ourselves as developers, challenging assumptions, and looks at things available to help us in our pursuit of excellence as software developers. This is one I've just added to my list, so I'm still pretty much getting started with it. So far it's been great (but it is a bit less casual than some of the others I've listed).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;font size="3"&gt;&lt;span style="font-weight: bold;"&gt;Others I Plan on Checking Out&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-weight: bold;" class="link"&gt;&lt;a target="_blank" href="http://polymorphicpodcast.com/"&gt;PolymorphicPodcast&lt;/a&gt;&lt;/div&gt;
&lt;div style="font-weight: bold;" class="link"&gt;&lt;a target="_blank" href="http://aspnetpodcast.com/"&gt;ASP.NET Podcast&lt;/a&gt;&lt;/div&gt;
&lt;div style="font-weight: bold;" class="link"&gt;&lt;a target="_blank" href="http://blog.stackoverflow.com/category/podcasts/"&gt;StackOverflow&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Are there any other great ones I'm missing from the list?&lt;img src="http://ryanfarley.com/blog/aggbug/38127.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2008/07/30/must-have-.net-developer-podcasts.aspx</guid>
            <pubDate>Wed, 30 Jul 2008 21:56:16 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2008/07/30/must-have-.net-developer-podcasts.aspx#feedback</comments>
            <slash:comments>17</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/38127.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/38127.aspx</trackback:ping>
        </item>
        <item>
            <title>SQL Queries to Analyze SharePoint Usage</title>
            <link>http://ryanfarley.com/blog/archive/2006/05/30/23103.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbff290100000000b100000001000e00&lt;/div&gt;&lt;P&gt;I came across this list on CodeProject of SQL Queries to analyze SharePoint details and usage. This is an awesome list. Granted it does bypass the SBS object model so isn't the recommended route, but still a great list of queries you could use to make reporting on your SharePoint sites a breeze.&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=link&gt;&lt;A href="http://www.codeproject.com/dotnet/QueriesToAnalyzeSPUsage.asp" target=_blank&gt;Useful SQL Queries to Analyze and Monitor SharePoint Portal Solutions Usage&lt;/A&gt; &lt;/DIV&gt;
&lt;/P&gt;&lt;img src="http://ryanfarley.com/blog/aggbug/23103.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2006/05/30/23103.aspx</guid>
            <pubDate>Tue, 30 May 2006 18:45:00 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2006/05/30/23103.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/23103.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/23103.aspx</trackback:ping>
        </item>
        <item>
            <title>Top 30 Popular Posts</title>
            <link>http://ryanfarley.com/blog/archive/2006/05/25/22689.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbff280100000000b100000001000d00&lt;/div&gt;&lt;P&gt;I started this blog in August of 2003, almost 3 years ago. I've made 176 posts in those 3 years. I don't post too often to my blog because I'm not all that big on posting stories about my kids, wife, dog, etc - although those do come in every now and then. Anyway, even when I have lulls where I am not posting as much, my traffic seems to stay pretty consistent. I'm actually amazed at how much traffic I get, especially when I consider how often I get around to posting (big thanks to all the visitors over the years). &lt;/P&gt;
&lt;P&gt;Some of my posts have apparently been useful :-), so I thought I would post the top 30 most popular posts I've made over the years (based on total number of unique views to the posts).&lt;/P&gt;
&lt;P&gt;
&lt;BLOCKQUOTE style="FONT-STYLE: normal"&gt;&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/12/21/1325.aspx"&gt;1. Set Focus to an ASP.NET Control&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Setting focus to controls in your&amp;nbsp;ASP.NET application&amp;nbsp;is a part of giving your end users the feel that they have come to expect. Making your web applications act more like Windows applications is a key to success (IMO). While setting focus to con...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;371,568&lt;/i&gt; - Posted on: 21-Dec-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/12/23/1330.aspx"&gt;2. Using the Web Browser Control in your C# Applications&lt;/a&gt;&lt;/b&gt;&lt;br&gt;It can be a powerful thing to display dynamic HTML in your C# applications. It can give your applications a modern look and feel and can make displaying data in non-standard ways easy with some simple markup. We have the web browser ActiveX control that wr...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;232,037&lt;/i&gt; - Posted on: 23-Dec-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/07/13/879.aspx"&gt;3. Writing to Your .NET Application's Config File&lt;/a&gt;&lt;/b&gt;&lt;br&gt;There's likely been times that you might have thought that it would make things convenient to write back to your .NET application's config file. The framework provides simple methods for reading from the config file, but gives you nothing for writing value...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;197,345&lt;/i&gt; - Posted on: 13-Jul-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/12/19/1313.aspx"&gt;4. Tips for SQL Server Identity Columns&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Tips on allowing inserts to identity columns and also for reseeding the identity value for a table....&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;117,941&lt;/i&gt; - Posted on: 19-Dec-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/01/07/261.aspx"&gt;5. Multiple Monitors rule&lt;/a&gt;&lt;/b&gt;&lt;br&gt;I love multiple monitors. I can't even imagine trying to work without multiple monitors and don't think I could ever go back to a single monitor....&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;96,533&lt;/i&gt; - Posted on: 7-Jan-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/08/23/8540.aspx"&gt;6. Unable to Start Debugging on the Web Server&lt;/a&gt;&lt;/b&gt;&lt;br&gt;I hate that, and it seems that every time I (or a co-worker) gets the error &amp;#8220;Unable to Start Debugging on the Web Server&amp;#8221; on a machine when attempting to debug an ASP.NET project, I have to scramble to remember what to look at. Here's a few things that has...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;91,037&lt;/i&gt; - Posted on: 23-Aug-2005 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/05/16/649.aspx"&gt;7. Stop Hijacking my Browser!&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Often in applications you have the need to launch a browser window to a specified URL. I recently evaluated various RSS readers where links to blog posts could be launched in an external browser window. What I found was that most of these applications woul...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;90,029&lt;/i&gt; - Posted on: 16-May-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/03/11/1886.aspx"&gt;8. Determining the Control that Caused a PostBack&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Many times you might need to perform some action on an ASP.NET postback based on the control that caused the postback to occur. Some scenarios for this might include a form with many regions, each having it's own CustomValidator and the ability to perform...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;69,089&lt;/i&gt; - Posted on: 11-Mar-2005 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/01/14/1439.aspx"&gt;9. Solving problems through programming...and why the Skype API sucks&lt;/a&gt;&lt;/b&gt;&lt;br&gt;I love to take the approach of solving computing problems through programming. Sometimes it backfires and I over-complicate the problem (I have been known to prematurely generalize from time to time). But usually I bask in the greatness of being a programm...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;60,149&lt;/i&gt; - Posted on: 14-Jan-2005 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/05/05/599.aspx"&gt;10. Enabling XP Themes in your .NET Applications&lt;/a&gt;&lt;/b&gt;&lt;br&gt;When you build Windows applications in .NET, by default your application will not have support for XP Themes, or Visual Styles. It is an easy enough task to do, and I think it goes a long way in giving your application a complete and professional look &amp; fe...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;49,397&lt;/i&gt; - Posted on: 5-May-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/02/15/1689.aspx"&gt;11. On the Subject of Dates in T-SQL&lt;/a&gt;&lt;/b&gt;&lt;br&gt;While we're on the subject of dates in T-SQL, I never liked getting the month and year for a date and sticking an '01' in the middle (then casting it all back to a datetime) to get the first day of the month for a given date value. Then you do the same to...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;42,317&lt;/i&gt; - Posted on: 15-Feb-2005 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/02/14/1685.aspx"&gt;12. Determining if a Date is a Weekday in T-SQL&lt;/a&gt;&lt;/b&gt;&lt;br&gt;I was reminded of a SQL function to determine if a date was a weekday or a weekend I wrote a while back when I saw the requirements of a project a colleague was working on. You'll see this requirement fairly often in many business applications. A company m...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;40,265&lt;/i&gt; - Posted on: 14-Feb-2005 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/06/08/766.aspx"&gt;13. Awesome web.config Changes in ASP.NET 2.0&lt;/a&gt;&lt;/b&gt;&lt;br&gt;There are some really cool changes coming in ASP.NET's web.config files that I am really excited about. I'll just point out a few that I've used (I hate going back to 1.1 because I can't use them). The web.config file in ASP.NET 2.0 allows you to set a lot...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;40,145&lt;/i&gt; - Posted on: 8-Jun-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/12/18/1300.aspx"&gt;14. Setting the Value of a TextBox with TextMode=Password&lt;/a&gt;&lt;/b&gt;&lt;br&gt;When the TextMode property of an ASP.NET TextBox is set to Password the value set in the Text property will not display at runtime. This can be a pain, however it is actually by design to prevent the unmasked password from being displayed in the HTML sourc...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;36,984&lt;/i&gt; - Posted on: 18-Dec-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/10/25/1127.aspx"&gt;15. T-SQL Olympics&lt;/a&gt;&lt;/b&gt;&lt;br&gt;OK, there is not an Olympics for T-SQL - but there should be. A friend of mine and I were talking the other day about &amp;#8220;gold-medal&amp;#8221; T-SQL we've come accross. The one that wins the gold for me is the code I found a long time ago on SQL Server Central from Ma...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;36,617&lt;/i&gt; - Posted on: 25-Oct-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/03/01/390.aspx"&gt;16. T-SQL: SET vs SELECT when assigning variables&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Do you know what the difference is between using SET and SELECT when assigning varaibles in T-SQL? Well, there is a difference. I came accross a great article by Narayana Vyas Kondreddi from the UK that describes the difference between the two....&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;36,204&lt;/i&gt; - Posted on: 1-Mar-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/12/27/1334.aspx"&gt;17. Interacting with the Web Browser Control&lt;/a&gt;&lt;/b&gt;&lt;br&gt;In my last post, I outlined some ways to make the Web Browser control more useful in your C# applications, to include things such as printing and setting the text or html of the browser dynamically. That is all good, but in a typical application it does li...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;35,885&lt;/i&gt; - Posted on: 27-Dec-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/04/12/526.aspx"&gt;18. Disabling the Windows Close action&lt;/a&gt;&lt;/b&gt;&lt;br&gt;There are times that you'll see a Window that has a close button in the titlebar, but it is disabled. This is often found in applications where the dialog/window changes it's status past a stoppable point so the Windows close action is removed so the user...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;35,796&lt;/i&gt; - Posted on: 12-Apr-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/03/23/465.aspx"&gt;19. Creating a IWin32Window from a Win32 Handle&lt;/a&gt;&lt;/b&gt;&lt;br&gt;There are times when you are integrating your .NET applications with other existing applications that you cannot modify and is possibly even non-.NET application. This can often result in problems integrating your .NET application's windows with the other...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;35,465&lt;/i&gt; - Posted on: 23-Mar-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/05/14/629.aspx"&gt;20. In Search of the Perfect RSS Reader&lt;/a&gt;&lt;/b&gt;&lt;br&gt;For the last year or two, I've been switching from reader to reader. While each one had features that I loved, they all seemed to fall short on one thing or another and I was never really 100% pleased with any of them. I went from SharpReader, to RSSBandit...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;33,384&lt;/i&gt; - Posted on: 14-May-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/02/17/1712.aspx"&gt;21. Flattening Out Data with One of the Coolest SQL Tricks Ever&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Not sure why, but I seem to be on a T-SQL kick lately - so here's another T-SQL post. One of my favorite T-SQL hacks ever is one that can flatten out data by taking a value from multiple rows and concatenating the values into a single string....&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;33,281&lt;/i&gt; - Posted on: 17-Feb-2005 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/06/16/788.aspx"&gt;22. Dynamically Loading Master Pages in ASP.NET 2.0&lt;/a&gt;&lt;/b&gt;&lt;br&gt;One of the cool new things introduced in ASP.NET 2.0 is Master Pages. Master Pages give you the ability to define a master page layout and look that is used throughout a site to give a consistent look &amp; feel to all pages. Any updates or changes to the look...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;33,156&lt;/i&gt; - Posted on: 16-Jun-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/05/10/605.aspx"&gt;23. Communication between applications via Windows Messages&lt;/a&gt;&lt;/b&gt;&lt;br&gt;At times I'll build a suite of related, but separate applications. Even though each application is a separate executable, I like to be able to integrate the applications so they can work together. Sending messages between your applications is a great way t...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;31,548&lt;/i&gt; - Posted on: 10-May-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/09/06/9208.aspx"&gt;24. Rendering Size (and other things) Correctly in FireFox&lt;/a&gt;&lt;/b&gt;&lt;br&gt;One thing that I just can't stand, is when a web page I build looks different in FireFox than how it looks in IE. Well, who doesn't?! The thing that really sucks is that there are things build in to how ASP.NET works that will cause this to happen. So unle...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;31,325&lt;/i&gt; - Posted on: 6-Sep-2005 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/05/26/737.aspx"&gt;25. Returning Objects from Web Services&lt;/a&gt;&lt;/b&gt;&lt;br&gt;When I work with web services I want things to work the same way as if I were working with a local layer that returns objects, not data. I don't want my code outside of the service to even see the data, just the objects that represent the data. Who doesn't...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;27,545&lt;/i&gt; - Posted on: 26-May-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2005/02/23/1739.aspx"&gt;26. Disabling Auto-Complete on ASP.NET Forms&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Popular browsers, such as Internet Explorer and Firefox support something called Auto-Complete. You've seen this many times. You go to a online form and as you start to type in fields you get a drop-down showing values you've typed in that field before. Th...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;26,844&lt;/i&gt; - Posted on: 23-Feb-2005 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/08/19/966.aspx"&gt;27. Intersection of Date Ranges&lt;/a&gt;&lt;/b&gt;&lt;br&gt;A friend of mine called me yesterday about a scheduling application he is working on. His question was so simple, or so it seemed, but it really drove me nuts. Basically he just wanted to find out if two date ranges intersected at all. Simple enough. It wa...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;24,593&lt;/i&gt; - Posted on: 19-Aug-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2006/01/11/14992.aspx"&gt;28. Tricking out the Desktop&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Something I have always been a sucker for is tricking out my desktop. I love any kind of tweak or gadget that enhances my pc and the whole user-experience thing. It's one of the many reasons I am looking forward to Vista. I've been a fan of applications th...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;24,497&lt;/i&gt; - Posted on: 11-Jan-2006 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/04/03/495.aspx"&gt;29. Retrieving database independent schema information&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Something that I think is often overlooked in the .NET Framework is the cool stuff you can get at using OleDbSchemaGuid to retrieve database schema information. I just thought of this again earlier today when I was reviewing a C# database application where...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;21,989&lt;/i&gt; - Posted on: 3-Apr-2004 &lt;/b&gt;&lt;br&gt;&lt;br&gt;
&lt;img src="/skins/ryanfarleyxpblue/images/icon-tip.gif" align="absmiddle"&gt; &lt;b&gt;&lt;A href="http://ryanfarley.com/blog/archive/2004/06/10/773.aspx"&gt;30. Creating Tracking Images for ASP.NET&lt;/a&gt;&lt;/b&gt;&lt;br&gt;Often with web applications you want to track traffic statistics to get a general idea of the number of visitors viewing a resource. Whether it be a web page, an RSS feed, an e-mail or whatever, you might want an inconspicuous way to determine that it has...&lt;br&gt;&lt;b&gt;Total views: &lt;i&gt;21,725&lt;/i&gt; - Posted on: 10-Jun-2004 &lt;/b&gt;&lt;/BLOCKQUOTE&gt;
&lt;/P&gt;
&lt;P&gt;Some of these are not as relevant now with .NET 2.0, so I guess I better get back on the bandwagon ;-)&lt;/P&gt;&lt;img src="http://ryanfarley.com/blog/aggbug/22689.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2006/05/25/22689.aspx</guid>
            <pubDate>Thu, 25 May 2006 18:41:00 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2006/05/25/22689.aspx#feedback</comments>
            <slash:comments>14</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/22689.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/22689.aspx</trackback:ping>
        </item>
        <item>
            <title>Adding Meta Tags to the Head in ASP.NET 2.0</title>
            <link>http://ryanfarley.com/blog/archive/2006/03/25/18992.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbff250100000000a600000001000500&lt;/div&gt;&lt;P&gt;After my last post on adding items to the page head in ASP.NET 2.0, &lt;A id=Comments.ascx_CommentList__ctl0_NameLink target=_blank&gt;Karthik Nataraaj&lt;/A&gt;&amp;nbsp;asked if there was a way to add meta tags as well. You are in luck Karthik. The HtmlMeta class is provided for just that. You can easily create a HtmlMeta object and add it to the Controls collection in the HtmlHead class exposed via Page.Header. Here's a few samples:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;span style="color: Green; "&gt;// Render: &amp;lt;meta name="keywords" content="Some words listed here" /&amp;gt;
&lt;/span&gt;HtmlMeta meta &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: Blue; "&gt;new&lt;/span&gt; HtmlMeta();
meta.Name &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: #008080; "&gt;"keywords"&lt;/span&gt;;
meta.Content &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: #008080; "&gt;"Some words listed here"&lt;/span&gt;;
&lt;span style="color: Blue; "&gt;this&lt;/span&gt;.Header.Controls.Add(meta);

&lt;span style="color: Green; "&gt;// Render: &amp;lt;meta name="robots" content="noindex" /&amp;gt;
&lt;/span&gt;meta &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: Blue; "&gt;new&lt;/span&gt; HtmlMeta();
meta.Name &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: #008080; "&gt;"robots"&lt;/span&gt;;
meta.Content &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: #008080; "&gt;"noindex"&lt;/span&gt;;
&lt;span style="color: Blue; "&gt;this&lt;/span&gt;.Header.Controls.Add(meta);

&lt;span style="color: Green; "&gt;// Render: &amp;lt;meta name="date" content="2006-03-25" scheme="YYYY-MM-DD" /&amp;gt;
&lt;/span&gt;meta &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: Blue; "&gt;new&lt;/span&gt; HtmlMeta();
meta.Name &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: #008080; "&gt;"date"&lt;/span&gt;;
meta.Content &lt;span style="color: Navy; "&gt;=&lt;/span&gt; DateTime.Now.ToString(&lt;span style="color: #008080; "&gt;"yyyy-MM-dd"&lt;/span&gt;);
meta.Scheme &lt;span style="color: Navy; "&gt;=&lt;/span&gt; &lt;span style="color: #008080; "&gt;"YYYY-MM-DD"&lt;/span&gt;;
&lt;span style="color: Blue; "&gt;this&lt;/span&gt;.Header.Controls.Add(meta);&lt;/PRE&gt;&lt;/P&gt;&lt;img src="http://ryanfarley.com/blog/aggbug/18992.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2006/03/25/18992.aspx</guid>
            <pubDate>Sat, 25 Mar 2006 19:05:00 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2006/03/25/18992.aspx#feedback</comments>
            <slash:comments>43</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/18992.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/18992.aspx</trackback:ping>
        </item>
        <item>
            <title>Easy Header Access in ASP.NET 2.0</title>
            <link>http://ryanfarley.com/blog/archive/2006/03/24/18930.aspx</link>
            <description>&lt;div style="display:none"&gt;qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbff240100000000b100000001000a00&lt;/div&gt;&lt;P&gt;I am easy to please when it comes to small and simple things that make my life as a developer easier. For example, I came accross something I had not noticed before in ASP.NET while reading &lt;A href="http://dbvt.com/blog/archive/2006/03/22/4123.aspx"&gt;a post from Dave Burke&lt;/A&gt;. The HtmlHead class exposed by the Page class as Page.Header. I love this. It makes it so easy to get to, and manipulate the header attributes for a page. A simple act of changing the page's title, style, etc before was a pain. Now it's just setting&amp;nbsp;a few properties.&lt;/P&gt;
&lt;P&gt;To change a page's title:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Header.Title &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: #008080"&gt;"This is the new page title."&lt;/SPAN&gt;;&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;To add a style attribute for the page:&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;Style style &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; Style();
style.ForeColor &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; System.Drawing.Color.Navy;
style.BackColor &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; System.Drawing.Color.LightGray;

&lt;SPAN style="COLOR: green"&gt;// Add the style to the header for the body of the page
&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Header.StyleSheet.CreateStyleRule(style, &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #008080"&gt;"body"&lt;/SPAN&gt;);&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;To&amp;nbsp;add a stylesheet to :&lt;/P&gt;
&lt;P&gt;&lt;PRE&gt;HtmlLink link &lt;SPAN style="COLOR: navy"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; HtmlLink();
link.Attributes.Add(&lt;SPAN style="COLOR: #008080"&gt;"type"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #008080"&gt;"text/css"&lt;/SPAN&gt;);
link.Attributes.Add(&lt;SPAN style="COLOR: #008080"&gt;"rel"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #008080"&gt;"stylesheet"&lt;/SPAN&gt;);
link.Attributes.Add(&lt;SPAN style="COLOR: #008080"&gt;"href"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #008080"&gt;"~/newstyle.css"&lt;/SPAN&gt;);
&lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;.Header.Controls.Add(link);&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Simple and elegant. I guess I can finally get rid of my helper classes to do all of that and keep things simpler. Sad that I had not noticed that was there in 2.0 earlier.&lt;/P&gt;&lt;img src="http://ryanfarley.com/blog/aggbug/18930.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ryan Farley</dc:creator>
            <guid>http://ryanfarley.com/blog/archive/2006/03/24/18930.aspx</guid>
            <pubDate>Fri, 24 Mar 2006 20:28:00 GMT</pubDate>
            <comments>http://ryanfarley.com/blog/archive/2006/03/24/18930.aspx#feedback</comments>
            <slash:comments>14</slash:comments>
            <wfw:commentRss>http://ryanfarley.com/blog/comments/commentRss/18930.aspx</wfw:commentRss>
            <trackback:ping>http://ryanfarley.com/blog/services/trackbacks/18930.aspx</trackback:ping>
        </item>
    </channel>
</rss>