<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">
  <channel>
    <title>Chris Pietschmann</title>
    <description>A passionate software developer from Wisconsin.</description>
    <link>http://pietschsoft.com/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.0.7</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://pietschsoft.com/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://feeds2.feedburner.com/simplovation</blogChannel:blink>
    <dc:creator>Chris Pietschmann</dc:creator>
    <dc:title>Chris Pietschmann</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/crpietschmann" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">crpietschmann</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>.NET Windows Service Installer and Auto Start After Installation</title>
      <description>&lt;p&gt;It’s not very often that I need to build a Windows Service for a specific task, and it’s even more rare that I need to create an Installer (.msi) to install/uninstall the service. Well, the project I’m currently working on (&lt;a href="http://virtualrouter.codeplex.com"&gt;http://virtualrouter.codeplex.com&lt;/a&gt;) requires me to 1) Install a Windows Service using a Setup Project, and 2) Start the Windows Service immediately after installation.&lt;/p&gt;  &lt;h3&gt;Create Setup Project for Windows Service&lt;/h3&gt;  &lt;p&gt;Just create a Setup Project within your Solution in Visual Studio, then follow the below steps:&lt;/p&gt;  &lt;p&gt;1) Right-Click the Setup Project you just created   &lt;br /&gt;2) Click “Add”, then “Project Output…”    &lt;br /&gt;3) In the dialog that appears select your Windows Service Project as Primary Output, then click OK.&lt;/p&gt;  &lt;p&gt;That’s really all that’s required. When the resulting Installer is executed it will Install / Uninstall the Windows Service.&lt;/p&gt;  &lt;p&gt;You can find a longer description of how to do this here:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/317421" href="http://support.microsoft.com/kb/317421"&gt;http://support.microsoft.com/kb/317421&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Auto Start Windows Service After Installation&lt;/h3&gt;  &lt;p&gt;Whether you use a Setup Project of the “installutil” tool to install your Windows Service, it can be very convenient if the service were to automatically start once installed. To do this all it takes is adding a couple lines of code to the ServiceInstaller that you have defined within your Windows Service Project to handle the “Committed” event, then use the ServiceController class to Start the service.&lt;/p&gt;  &lt;p&gt;Here’s an example ServiceInstaller with the “Auto Start” code in place:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;[RunInstaller(&lt;span class="kwrd"&gt;true&lt;/span&gt;)]
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ServiceInstaller : Installer
{
    &lt;span class="kwrd"&gt;string&lt;/span&gt; strServiceName = &lt;span class="str"&gt;&amp;quot;MyServiceName&amp;quot;&lt;/span&gt;;

    &lt;span class="kwrd"&gt;public&lt;/span&gt; ServiceInstaller()
    {
        var processInstaller = &lt;span class="kwrd"&gt;new&lt;/span&gt; ServiceProcessInstaller();
        var serviceInstaller = &lt;span class="kwrd"&gt;new&lt;/span&gt; ServiceInstaller();

        processInstaller.Account = ServiceAccount.LocalSystem;
        processInstaller.Username = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
        processInstaller.Password = &lt;span class="kwrd"&gt;null&lt;/span&gt;;

        serviceInstaller.DisplayName = strServiceName;
        serviceInstaller.StartType = ServiceStartMode.Automatic;

        serviceInstaller.ServiceName = strServiceName;

        &lt;span class="kwrd"&gt;this&lt;/span&gt;.Installers.Add(processInstaller);
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.Installers.Add(serviceInstaller);

        &lt;span class="kwrd"&gt;this&lt;/span&gt;.Committed += &lt;span class="kwrd"&gt;new&lt;/span&gt; InstallEventHandler(ServiceInstaller_Committed);
    }

    &lt;span class="kwrd"&gt;void&lt;/span&gt; ServiceInstaller_Committed(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, InstallEventArgs e)
    {
        &lt;span class="rem"&gt;// Auto Start the Service Once Installation is Finished.&lt;/span&gt;
        var controller = &lt;span class="kwrd"&gt;new&lt;/span&gt; ServiceController(strServiceName);
        controller.Start();
    }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;These are two tips that for some reason had eluded me for a long time. Usually I just created a .bat file to call “installutil” and “net start” to install and start my services manually. In most cases that worked perfect since it was very rare that the service was installed on a new computer or updated to a newer version. However, while building an “End User Friendly” Installer that anyone can run, you need to automate the installation and start up of the Windows Service.&lt;/p&gt;

&lt;p&gt;This is just the thing that I’m running into with the new &lt;a href="http://virtualrouter.codeplex.com"&gt;http://virtualrouter.codeplex.com&lt;/a&gt; project that I’m working on. The “Virtual Router” project utilizes Windows 7’s Virtual Wifi and Wireless Hosted Network API’s to turn any computer into a Wireless Access Point / Router. Look for the first release of this project soon!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Z6ecLv9wyg-o6GFv0uMHWbTEx8Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z6ecLv9wyg-o6GFv0uMHWbTEx8Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Z6ecLv9wyg-o6GFv0uMHWbTEx8Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z6ecLv9wyg-o6GFv0uMHWbTEx8Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=2-4RnMg0IEE:tKVKQo4Vqbk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=2-4RnMg0IEE:tKVKQo4Vqbk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=2-4RnMg0IEE:tKVKQo4Vqbk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=2-4RnMg0IEE:tKVKQo4Vqbk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=2-4RnMg0IEE:tKVKQo4Vqbk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/2-4RnMg0IEE" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/11/06/dotNet-Windows-Service-Installer-And-Auto-Start-After-Installation.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/11/06/dotNet-Windows-Service-Installer-And-Auto-Start-After-Installation.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=c86d128f-970b-4b3a-bfeb-4d51ab34f051</guid>
      <pubDate>Fri, 06 Nov 2009 10:10:38 -0600</pubDate>
      <category>C#</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=c86d128f-970b-4b3a-bfeb-4d51ab34f051</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=c86d128f-970b-4b3a-bfeb-4d51ab34f051</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/11/06/dotNet-Windows-Service-Installer-And-Auto-Start-After-Installation.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=c86d128f-970b-4b3a-bfeb-4d51ab34f051</wfw:commentRss>
    </item>
    <item>
      <title>MvcMaps Preview 1 – A Unified Bing/Google Maps API for ASP.NET MVC</title>
      <description>&lt;p&gt;I spent some time lately working on bringing some of the concepts of Web.Maps.VE to ASP.NET MVC. The concepts I’m referring to are Simplicity and Ease of Development in making the implementation of mapping within ASP.NET MVC applications as simple as possible along with the Flexibility and Customizability of the Base Mapping API itself. Then I thought, Since I’m building an abstraction layer to simplify Bing Maps development, why not implement it in a flexible manor as to be able to support other Mapping API’s as well?&lt;/p&gt;  &lt;p&gt;The result of such an effort in a nice Unified API that allows virtually the same code to be written when implementing either Bing Maps or Google Maps. In fact, all you need to do to change your application over to using one mapping provider instead of the other is to just change a single line of code.&lt;/p&gt;  &lt;p&gt;Sound too good to be true?&lt;/p&gt;  &lt;p&gt;I introduce you to the all new “&lt;a title="MvcMaps Project" href="http://mvcmaps.codeplex.com" target="_blank"&gt;MvcMaps&lt;/a&gt;” project, and I’m releasing it as Open Source under the Microsoft Public License.&lt;/p&gt;  &lt;p&gt;Source Code: &lt;a title="MvcMaps Preview 1 Release Source Code" href="http://mvcmaps.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35231" target="_blank"&gt;MvcMaps Preview 1 (698Kb)&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Preview Release?&lt;/h3&gt;  &lt;p&gt;This initial release is just a “Preview” release and isn’t really meant for production use, although there’s absolutely nothing stopping you from using it in such an environment.&lt;/p&gt;  &lt;h3&gt;Introduction&lt;/h3&gt;  &lt;p&gt;The above source code download link contains the full source code for the component, plus a very basic “Interactive SDK” style website demonstrating some basic examples of using it.&lt;/p&gt;  &lt;p&gt;The following snippet is the most basic example of how to add both a Bing Map and a Google Map within a View:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Import Namespace=&amp;quot;MvcMaps&amp;quot; %&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;style&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
.BingMap
{
    width: 600px;
    height: 400px;
    border: solid 1px black;
}
.GoogleMap
{
    width: 600px;
    height: 400px;
    border: solid 1px black;
}
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h3&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Bing Map&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h3&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Ajax.BingMap()     &lt;span class="rem"&gt;// Create a Bing Map&lt;/span&gt;
    .CssClass(&lt;span class="str"&gt;&amp;quot;BingMap&amp;quot;&lt;/span&gt;) &lt;span class="rem"&gt;// Define the CSS Style to use. These specify the Maps Size&lt;/span&gt;
    .Render();           &lt;span class="rem"&gt;// Render all the HTML / JavaScript necessary to create the Map to Server.Response&lt;/span&gt;
    &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h3&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Google Map&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h3&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Ajax.GoogleMap()      &lt;span class="rem"&gt;// Create a Google Map&lt;/span&gt;
    .CssClass(&lt;span class="str"&gt;&amp;quot;GoogleMap&amp;quot;&lt;/span&gt;)  &lt;span class="rem"&gt;// Define the CSS Style to use. These specify the Maps Size&lt;/span&gt;
    .Render();              &lt;span class="rem"&gt;// Render all the HTML / JavaScript necessary to create the Map to Server.Response&lt;/span&gt;
    &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Notice that the code is idential, except for the “BingMap” and “GoogleMap” parts. That is how you define the specific mapping provider to use, but the rest of the code is the same.&lt;/p&gt;

&lt;h3&gt;Plotting Pushpins, Polylines and Polygons&lt;/h3&gt;

&lt;p&gt;Adding some Pushpins, Polylines and Polygons is extremely simple, and its the same code for both Bing Maps and Google Maps!&lt;/p&gt;

&lt;p&gt;Here’s a basic example of adding one of each:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Ajax.BingMap().CssClass(&lt;span class="str"&gt;&amp;quot;BingMap&amp;quot;&lt;/span&gt;)
    &lt;span class="rem"&gt;// Add Pushpin Shape&lt;/span&gt;
    .AddPushpin(
        &lt;span class="kwrd"&gt;new&lt;/span&gt; Pushpin(39.9097362345372, -97.470703125,
             &lt;span class="str"&gt;&amp;quot;Some Pushpin Title&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;Some Pushpin Description&amp;quot;&lt;/span&gt;)
        )
    
    &lt;span class="rem"&gt;// Add Polyline Shape&lt;/span&gt;
    .AddPolyline(
        &lt;span class="kwrd"&gt;new&lt;/span&gt; Polyline(&lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;LatLng&amp;gt;() {
            &lt;span class="kwrd"&gt;new&lt;/span&gt; LatLng(48.166085, -121.11328),
            &lt;span class="kwrd"&gt;new&lt;/span&gt; LatLng(34.270835, -118.34472),
            &lt;span class="kwrd"&gt;new&lt;/span&gt; LatLng(43.041543, -87.901954),
            &lt;span class="kwrd"&gt;new&lt;/span&gt; LatLng(38.889546, -77.035338)
        }) {
            LineColor = &lt;span class="str"&gt;&amp;quot;#0000FF&amp;quot;&lt;/span&gt;,
            LineWeight = 6
        }
    )
    
    &lt;span class="rem"&gt;// Add Polygon Shape&lt;/span&gt;
    .AddPolygon(
        &lt;span class="kwrd"&gt;new&lt;/span&gt; Polygon(&lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;LatLng&amp;gt;() {
            &lt;span class="kwrd"&gt;new&lt;/span&gt; LatLng(34.270835, -118.34472),
            &lt;span class="kwrd"&gt;new&lt;/span&gt; LatLng(43.041543, -87.901954),
            &lt;span class="kwrd"&gt;new&lt;/span&gt; LatLng(38.889546, -77.035338)
        }) {
            FillColor = &lt;span class="str"&gt;&amp;quot;#00ff00&amp;quot;&lt;/span&gt;,
            FillOpacity = 0.5,
            LineWeight = 2,
            LineColor = &lt;span class="str"&gt;&amp;quot;#FF0000&amp;quot;&lt;/span&gt;
        }
    )
    
    &lt;span class="rem"&gt;// Render Map (HTML and JavaScript) to the Page&lt;/span&gt;
    .Render()
&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Dynamic / Interactive Style Map&lt;/h3&gt;

&lt;p&gt;One of the &lt;strong&gt;coolest&lt;/strong&gt; features I’ve built into the component so far is the ability to extremely easily add Dynamic / Interactive Style Map.&lt;/p&gt;

&lt;p&gt;You probably wouldn’t believe me if I explained in words how simple it is to add a dynamic style map, so instead I’ll just show you the most basic code to get it working.&lt;/p&gt;

&lt;p&gt;Here’s the code to add the Map to the Page. In this example you just tell the Map what Controller and Action to call to get the Map data to be displayed.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Ajax.BingMap()
    .CssClass(&lt;span class="str"&gt;&amp;quot;BingMap&amp;quot;&lt;/span&gt;)
    .DynamicMap( &lt;span class="kwrd"&gt;new&lt;/span&gt; { controller = &lt;span class="str"&gt;&amp;quot;DynamicMap&amp;quot;&lt;/span&gt;, action = &lt;span class="str"&gt;&amp;quot;SchoolDistricts&amp;quot;&lt;/span&gt; })
    .Render();
&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Then you define your Controller Action, make it accept the Map View (or Map Bounds) which are essentially the Min and Max Lat/Lng values of the visible area on the client, and then you just return a “MapDataResult” object that contains the Pushpins, Polylines and Polygons to be plotted.&lt;/p&gt;

&lt;p&gt;The following example demonstrates searching an XML file for School Districts within the Maps Viewable Area, and then plots them on the Map using Pushpins. As of MvcMaps Preview 1, only Pushpins are supported with the MapDataResult object.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; DynamicMapController : Controller
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult SchoolDistricts(&lt;span class="kwrd"&gt;double&lt;/span&gt; minLat, &lt;span class="kwrd"&gt;double&lt;/span&gt; maxLat, &lt;span class="kwrd"&gt;double&lt;/span&gt; minLng, &lt;span class="kwrd"&gt;double&lt;/span&gt; maxLng)
    {
        &lt;span class="rem"&gt;// Query and Get all School Districts within the passed in &amp;quot;Map View&amp;quot;.&lt;/span&gt;
        var doc = XDocument.Load(Server.MapPath(&lt;span class="str"&gt;&amp;quot;~/App_Data/WISchoolDistricts.xml&amp;quot;&lt;/span&gt;));
        var schooldistricts = (from d &lt;span class="kwrd"&gt;in&lt;/span&gt; doc.Element(&lt;span class="str"&gt;&amp;quot;schooldistricts&amp;quot;&lt;/span&gt;).Elements(&lt;span class="str"&gt;&amp;quot;schooldistrict&amp;quot;&lt;/span&gt;)
                        &lt;span class="kwrd"&gt;where&lt;/span&gt; &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(d.Attribute(&lt;span class="str"&gt;&amp;quot;latitude&amp;quot;&lt;/span&gt;).Value) &amp;gt;= minLat
                        &amp;amp;&amp;amp; &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(d.Attribute(&lt;span class="str"&gt;&amp;quot;latitude&amp;quot;&lt;/span&gt;).Value) &amp;lt;= maxLat
                        &amp;amp;&amp;amp; &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(d.Attribute(&lt;span class="str"&gt;&amp;quot;longitude&amp;quot;&lt;/span&gt;).Value) &amp;gt;= minLng
                        &amp;amp;&amp;amp; &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(d.Attribute(&lt;span class="str"&gt;&amp;quot;longitude&amp;quot;&lt;/span&gt;).Value) &amp;lt;= maxLng
                        select d
                    );

        &lt;span class="rem"&gt;// Generate &amp;quot;Pushpin&amp;quot; objects for each School District to be Plotted on the Map.&lt;/span&gt;
        var pushpins = (from d &lt;span class="kwrd"&gt;in&lt;/span&gt; schooldistricts
                        select(&lt;span class="kwrd"&gt;new&lt;/span&gt; Pushpin(
                            &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(d.Attribute(&lt;span class="str"&gt;&amp;quot;latitude&amp;quot;&lt;/span&gt;).Value),
                            &lt;span class="kwrd"&gt;double&lt;/span&gt;.Parse(d.Attribute(&lt;span class="str"&gt;&amp;quot;longitude&amp;quot;&lt;/span&gt;).Value)
                        ){
                            Title = d.Attribute(&lt;span class="str"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;).Value,
                            Description = d.Attribute(&lt;span class="str"&gt;&amp;quot;address&amp;quot;&lt;/span&gt;).Value
                        }));

        &lt;span class="rem"&gt;// Return a &amp;quot;MapDataResult&amp;quot; object that contains all the data that is to be Plotted on the Map.&lt;/span&gt;
        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; MapDataResult()
        {
            Pushpins = pushpins
        };
    }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yes it really is that simple!!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;How to Customize the Dynamic Map&lt;/h3&gt;

&lt;p&gt;The Dynamic Map example above is nice and simple, but if you need to customize the client-side map behavior somehow, don’t worry, there are “override” hooks built in to the component that allow you to override the complete behavior of the map in how it displays the data, or just execute some custom code on the returned data after it’s already been plotted.&lt;/p&gt;

&lt;p&gt;You can use the DynamicMap&amp;#160; DataLoad option to specify a JavaScript function to get called every time map data is automatically loaded. The following example displayed the total number of Pushpins currently plotted in a SPAN tag above the Map. The “data” parameter on the function is the data object that is returned from the MapDataResult passed down from the controller action method.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;Pushpin Count: &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;='lblPushpinCount'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Ajax.BingMap()
    .CssClass(&lt;span class="str"&gt;&amp;quot;BingMap&amp;quot;&lt;/span&gt;)
    .DynamicMap(
        &lt;span class="kwrd"&gt;new&lt;/span&gt; { controller = &lt;span class="str"&gt;&amp;quot;DynamicMap&amp;quot;&lt;/span&gt;, action = &lt;span class="str"&gt;&amp;quot;SchoolDistricts&amp;quot;&lt;/span&gt; },
        &lt;span class="kwrd"&gt;new&lt;/span&gt; DynamicMapOptions() {
            DataLoaded = &lt;span class="str"&gt;&amp;quot;function(data) { $('#lblPushpinCount').html(data.pushpins.length); }&amp;quot;&lt;/span&gt;
        })
    .Render();
&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Also, you can use the DynamicMap DisplayData option to completely override the maps default behavior of plotting the data. Just in case you need to completely customize it, and the default behavior just doesn’t cut it. The following example plots the Pushpins returned and displays the total number of pushpins in a SPAN tag above the Map:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;Pushpin Count: &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;='lblPushpinCount'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Ajax.BingMap()
    .CssClass(&lt;span class="str"&gt;&amp;quot;BingMap&amp;quot;&lt;/span&gt;)
    .DynamicMap(
        &lt;span class="kwrd"&gt;new&lt;/span&gt; { controller = &lt;span class="str"&gt;&amp;quot;DynamicMap&amp;quot;&lt;/span&gt;, action = &lt;span class="str"&gt;&amp;quot;SchoolDistricts&amp;quot;&lt;/span&gt; },
        &lt;span class="kwrd"&gt;new&lt;/span&gt; DynamicMapOptions() {
            DisplayData = &lt;span class="str"&gt;&amp;quot;DynamicMap_DisplayData_Handler&amp;quot;&lt;/span&gt;
        })
    .Render();
&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/javascritp&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;function&lt;/span&gt; DynamicMap_DisplayData_Handler(data) {
    &lt;span class="rem"&gt;// Method gets called with &amp;quot;this&amp;quot; equaling the Mvc.Maps JavaScript Map Object&lt;/span&gt;
    
    &lt;span class="rem"&gt;// Clear All Currently Plotted Data&lt;/span&gt;
    &lt;span class="kwrd"&gt;this&lt;/span&gt;.clearDynamicMapData();
    
    &lt;span class="rem"&gt;// Plot New Pushpins that were Loaded&lt;/span&gt;
    &lt;span class="kwrd"&gt;this&lt;/span&gt;.plotPushpins(data.pushpins);

    &lt;span class="rem"&gt;// Display Pushpin Count&lt;/span&gt;
    $(&lt;span class="str"&gt;'#lblPushpinCount'&lt;/span&gt;).html(data.pushpins.length);
}
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Map Load Event&lt;/h3&gt;

&lt;p&gt;In case you need to execute some code on the Page as soon as the Map has finished loading, you can specify any JavaScript code you need to be executed.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;-- Pass &lt;span class="kwrd"&gt;in&lt;/span&gt; JavaScript &lt;span class="kwrd"&gt;as&lt;/span&gt; String --&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Ajax.GoogleMap()
        .Load(&lt;span class="str"&gt;&amp;quot;alert('Map Loaded!');&amp;quot;&lt;/span&gt;)
        .Render();
        &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
        
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;-- Use Lambda Expression to define JavaScript code --&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Ajax.GoogleMap()
        .Load( () =&amp;gt; {&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
            alert('Map Loaded!');
            // var map = this.mapObject  //&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;--&lt;/span&gt; get ref to underlying map providers object
        &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;})
        .Render();
        &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;When specifying code to execute on the Load event, the context of the “this” keyword will be a reference to the client-side MvcMaps Map Object. To get a reference to the underlying Map Providers object (VEMap or GMap2), just access it’s “mapObject” property like so:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; map = &lt;span class="kwrd"&gt;this&lt;/span&gt;.mapObject;&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;The &lt;a href="http://mvcmaps.codeplex.com" target="_blank"&gt;MvcMaps&lt;/a&gt; project really makes it dead simple to implement mapping in an ASP.NET MVC Web Application. There’s no need to worry about all the tedious work that you used to have to do on every page.&lt;/p&gt;

&lt;p&gt;I plan on building out a few more features into the component, and getting it to the point of a “Stable” release soon. I just wanted to share what I’ve done so far, so others can provide feedback.&lt;/p&gt;

&lt;p&gt;If you have any comments and/or suggestions on the Preview 1 release, please either leave a comment here or post to the projects &lt;a title="MvcMaps Discussion Forums" href="http://mvcmaps.codeplex.com/Thread/List.aspx" target="_blank"&gt;Discussion Forums&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also, don’t forget to download the code and the “Interactive SDK” from the link at the top of this post.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6YwnwmGkJ88opvdlFo2DcAS4QM0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6YwnwmGkJ88opvdlFo2DcAS4QM0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6YwnwmGkJ88opvdlFo2DcAS4QM0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6YwnwmGkJ88opvdlFo2DcAS4QM0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=2hov-dfHVzs:4HkymVEnIbE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=2hov-dfHVzs:4HkymVEnIbE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=2hov-dfHVzs:4HkymVEnIbE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=2hov-dfHVzs:4HkymVEnIbE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=2hov-dfHVzs:4HkymVEnIbE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/2hov-dfHVzs" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/11/02/MvcMaps-Preview-1-e28093-A-Unified-BingGoogle-Maps-API-for-ASPNET-MVC.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/11/02/MvcMaps-Preview-1-e28093-A-Unified-BingGoogle-Maps-API-for-ASPNET-MVC.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=3a97ee01-5b36-4f43-abdb-1a9b685c6440</guid>
      <pubDate>Mon, 02 Nov 2009 22:01:08 -0600</pubDate>
      <category>Bing Maps</category>
      <category>ASP.NET MVC</category>
      <category>JavaScript</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=3a97ee01-5b36-4f43-abdb-1a9b685c6440</pingback:target>
      <slash:comments>6</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=3a97ee01-5b36-4f43-abdb-1a9b685c6440</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/11/02/MvcMaps-Preview-1-e28093-A-Unified-BingGoogle-Maps-API-for-ASPNET-MVC.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=3a97ee01-5b36-4f43-abdb-1a9b685c6440</wfw:commentRss>
    </item>
    <item>
      <title>Easily Convert Between HTML and RGB Colors using JavaScript</title>
      <description>&lt;p&gt;To make things easier for converting between HTML Colors and RGB Colors using JavaScript I wrote the below “ColorConverter” object. This object has 2 methods that easily allow you to convert between HTML Colors (ex: #FF33C2) and RGB Colors (ex: 255, 0, 233). There isn’t anything built into JavaScript for doing this, and it can come in very handing when working with the &lt;a href="http://msdn.microsoft.com/en-us/library/bb412453.aspx" target="_blank"&gt;Bing Maps VEColor object&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Usage Examples:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; rgb = ColorConverter.toRGB(&lt;span class="str"&gt;&amp;quot;#FF000A&amp;quot;&lt;/span&gt;); &lt;span class="rem"&gt;// returns {r:255, g:0, b:10}&lt;/span&gt;

&lt;span class="kwrd"&gt;var&lt;/span&gt; htmlColor = ColorConverter.toHTML(255,0,14); &lt;span class="rem"&gt;// returns &amp;quot;FF0021&amp;quot;&lt;/span&gt;

&lt;span class="rem"&gt;// Also supports 3 character HTML color values like the Web Browsers and CSS do&lt;/span&gt;
rgb = ColorConverter.toRGB(&lt;span class="str"&gt;&amp;quot;#DDD&amp;quot;&lt;/span&gt;); // returns {r:255, g:255, b:255}&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;Full Code for the “ColorConverter”:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;(&lt;span class="kwrd"&gt;function&lt;/span&gt;(){
    window.ColorConverter = {
        toHTML: &lt;span class="kwrd"&gt;function&lt;/span&gt;(r, g, b){
            &lt;span class="kwrd"&gt;return&lt;/span&gt; $ensureHexLength(r.toString(16)) + $ensureHexLength(g.toString(16)) + $ensureHexLength(b.toString(16));
        },
        toRGB: &lt;span class="kwrd"&gt;function&lt;/span&gt;(color){
            &lt;span class="kwrd"&gt;var&lt;/span&gt; r, g, b;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; html = color;
            
            &lt;span class="rem"&gt;// Parse out the RGB values from the HTML Code&lt;/span&gt;
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (html.substring(0, 1) == &lt;span class="str"&gt;&amp;quot;#&amp;quot;&lt;/span&gt;)
            {
                html = html.substring(1);
            }
            
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (html.length == 3)
            {
                r = html.substring(0, 1);
                r = r + r;
                
                g = html.substring(1, 2);
                g = g + g;
                
                b = html.substring(2, 3);
                b = b + b;
            }
            &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt; (html.length == 6)
            {
                r = html.substring(0, 2);
                g = html.substring(2, 4);
                b = html.substring(4, 6);
            }
        
            &lt;span class="rem"&gt;// Convert from Hex (Hexidecimal) to Decimal&lt;/span&gt;
            r = parseInt(r, 16);
            g = parseInt(g, 16);
            b = parseInt(b, 16);
        
            &lt;span class="kwrd"&gt;return&lt;/span&gt; {r: r, g: g, b: b};
        }
    };
    
    &lt;span class="kwrd"&gt;function&lt;/span&gt; $ensureHexLength(str){
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (str.length == 1){
            str = &lt;span class="str"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; + str;
        }
        &lt;span class="kwrd"&gt;return&lt;/span&gt; str;
    }
})();&lt;/pre&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pjAQfjDqAd0MxJIHPr-KUr1j_t0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pjAQfjDqAd0MxJIHPr-KUr1j_t0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pjAQfjDqAd0MxJIHPr-KUr1j_t0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pjAQfjDqAd0MxJIHPr-KUr1j_t0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=8BRf3O5A_R4:3ISNVCUwgoM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=8BRf3O5A_R4:3ISNVCUwgoM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=8BRf3O5A_R4:3ISNVCUwgoM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=8BRf3O5A_R4:3ISNVCUwgoM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=8BRf3O5A_R4:3ISNVCUwgoM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/8BRf3O5A_R4" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/10/24/Convert_Between_HTML_and_RGB_Colors_using_JavaScript.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/10/24/Convert_Between_HTML_and_RGB_Colors_using_JavaScript.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=4b595a62-7f09-41cc-9ca3-da351bb27a8a</guid>
      <pubDate>Sat, 24 Oct 2009 14:08:00 -0600</pubDate>
      <category>JavaScript</category>
      <category>Bing Maps</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=4b595a62-7f09-41cc-9ca3-da351bb27a8a</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=4b595a62-7f09-41cc-9ca3-da351bb27a8a</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/10/24/Convert_Between_HTML_and_RGB_Colors_using_JavaScript.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=4b595a62-7f09-41cc-9ca3-da351bb27a8a</wfw:commentRss>
    </item>
    <item>
      <title>Visual Studio 2010 Beta 2 Setup Contains a Weird Blue Mac-Style Button!</title>
      <description>&lt;p&gt;I just finished installing Visual Studio 2010 Beta 2 within a Windows 7 Virtual Machine running within Windows VIrtual PC and the Final/Finish screen of the installation wizard contains a weird, blue, Mac-style Button. Ok, I know it’s not exactly how the button are in the UI of Max OSX, but it’s much closer to that than it is to Windows 7 buttons.&lt;/p&gt;  &lt;p&gt;The button looks so incredibly out of place, and I wonder who decided that it should be used, especially since it doesn’t match the UI of either the installer or Windows itself.&lt;/p&gt;  &lt;p&gt;You can see a screenshot of it below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=VS2010_WeirdGelButton01.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VS2010_WeirdGelButton01" border="0" alt="VS2010_WeirdGelButton01" src="http://pietschsoft.com/image.axd?picture=VS2010_WeirdGelButton01_thumb.png" width="631" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-6iokDgj3Drl-poSjh2lzcbbsQg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-6iokDgj3Drl-poSjh2lzcbbsQg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-6iokDgj3Drl-poSjh2lzcbbsQg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-6iokDgj3Drl-poSjh2lzcbbsQg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=8O1TvK7NPDg:sEm3BPdfMq0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=8O1TvK7NPDg:sEm3BPdfMq0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=8O1TvK7NPDg:sEm3BPdfMq0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=8O1TvK7NPDg:sEm3BPdfMq0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=8O1TvK7NPDg:sEm3BPdfMq0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/8O1TvK7NPDg" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/10/20/Visual_Studio_2010_Beta_2_Setup_Contains_Weird_Blue_Mac-Style_Button.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/10/20/Visual_Studio_2010_Beta_2_Setup_Contains_Weird_Blue_Mac-Style_Button.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=9dd08a92-e8c0-45c9-97a7-44d2e652c5dd</guid>
      <pubDate>Tue, 20 Oct 2009 06:39:34 -0600</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=9dd08a92-e8c0-45c9-97a7-44d2e652c5dd</pingback:target>
      <slash:comments>4</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=9dd08a92-e8c0-45c9-97a7-44d2e652c5dd</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/10/20/Visual_Studio_2010_Beta_2_Setup_Contains_Weird_Blue_Mac-Style_Button.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=9dd08a92-e8c0-45c9-97a7-44d2e652c5dd</wfw:commentRss>
    </item>
    <item>
      <title>2009 Reading Goal Is On Track</title>
      <description>&lt;p&gt;I really haven't been reading enough books of the the last few years. Sure I read a ton of blogs and such online, but what about books? Books are nice, cohesive collections of information; at least most of the time. There are a lot of things I'd like to learn more about, both related to computers and not. So, sometime in January (this wasn't a new years resolution, just a coincidence), I decided to try to read at minimum 12 books throughout the year. Basically, at least 1 book each month, and after seemingly falling behind a few times, to my surprise, it seems that I am on track.&lt;/p&gt;
&lt;p&gt;Here's the list of books that I've read so far this year in order of first to most recent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Art-Deception-Controlling-Element-Security/dp/076454280X?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;The Art of Deception: Controlling the Human Element of Security&lt;/a&gt; by Kevin D. Mitnick&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Beginning-Spatial-SQL-Server-2008/dp/1430218290?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;Beginning Spatial with SQL Server 2008&lt;/a&gt; by Alistair Aitchison&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Users-Guide-Brain-Perception-Attention/dp/0375701079?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;A User's Guid to the Brain: Perception, Attention, and the Four Theaters of the Brain&lt;/a&gt; by &lt;a href="http://www.johnratey.com"&gt;John J. Ratey&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Cesars-Way-Everyday-Understanding-Correcting/dp/0307337979?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;Cesar's Way: The Natural, Everyday Guide to Understanding and Correcting Common Dog Problems&lt;/a&gt; by &lt;a href="http://www.cesarmillaninc.com/"&gt;Cesar Millan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Pro-WPF-2008-Presentation-Professionals/dp/1590599551?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;Pro WPF in C# 2008&lt;/a&gt; by Matthew MacDonald&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Professional-ASP-NET-MVC-Wrox-Programmer/dp/0470384611?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;Professional ASP.NET MVC 1.0&lt;/a&gt; by "&lt;a href="http://haacked.com/archive/2009/04/29/aspnetmvc-nerddinner-walkthrough.aspx"&gt;The 4 Extended Foreheads&lt;/a&gt;" (Rob Conery, Scott Hanselman, Phil Haack, Scott Guthrie)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Thinking-Pictures-Expanded-Life-Autism/dp/0307275655?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;Thinking in Pictures, Expanded Edition: My Life with Autism&lt;/a&gt; by &lt;a href="http://www.templegrandin.com"&gt;Temple Grandin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Brief-History-Time-Stephen-Hawking/dp/0553380168?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;A Brief History of Time: The Updated And Expanded Tenth Anniversary Edition&lt;/a&gt; by Stephen Hawking&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/jQuery-Action-Bear-Bibeault/dp/1933988355?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;jQuery in Action&lt;/a&gt; by Bear Bibeault, Yehuda Katz&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.amazon.com/Code-Language-Computer-Hardware-Software/dp/0735611319?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;Code: The Hidden Language of Computer Hardware and Software&lt;/a&gt; by Charles Petzold&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Keep in mind that it took me anywhere from 1 to 3 months to find the time to read some of these books.&lt;/p&gt;
&lt;p&gt;The book I am currently reading is...&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.amazon.com/Be-Pack-Leader-Cesars-Transform/dp/0307381676?&amp;amp;camp=212361&amp;amp;linkCode=wey&amp;amp;tag=pietschsoft-20&amp;amp;creative=380729"&gt;Be the Pack Leader: Use Cesar's Way to Transform Your Dog ... And Your Life&lt;/a&gt; by &lt;a href="http://www.cesarmillaninc.com/"&gt;Cesar Millan&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wow, and to my surprise I'm currently on book number 11 for the year. Maybe I'll be able to read a total of 12 or 13 books before the years end. I guess only time will tell.&lt;/p&gt;
&lt;p&gt;Happy Reading!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xOJNi4s89dA_ujEuONEtaScAx9w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xOJNi4s89dA_ujEuONEtaScAx9w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xOJNi4s89dA_ujEuONEtaScAx9w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xOJNi4s89dA_ujEuONEtaScAx9w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=_r-N2p6txPA:QGbPCjpxChA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=_r-N2p6txPA:QGbPCjpxChA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=_r-N2p6txPA:QGbPCjpxChA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=_r-N2p6txPA:QGbPCjpxChA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=_r-N2p6txPA:QGbPCjpxChA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/_r-N2p6txPA" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/10/16/2009-Reading-Goal-Is-On-Track.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/10/16/2009-Reading-Goal-Is-On-Track.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=f49f6aed-6b75-444d-9c28-e0ac07073d11</guid>
      <pubDate>Fri, 16 Oct 2009 09:08:00 -0600</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=f49f6aed-6b75-444d-9c28-e0ac07073d11</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=f49f6aed-6b75-444d-9c28-e0ac07073d11</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/10/16/2009-Reading-Goal-Is-On-Track.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=f49f6aed-6b75-444d-9c28-e0ac07073d11</wfw:commentRss>
    </item>
    <item>
      <title>IT’s A GIRL!</title>
      <description>&lt;p&gt;Some of you that follow my blog may have noticed that it’s been almost a month since I’ve really posted anything. I know I’ve done this in the past when I’ve been busy working on other things (mostly to get paid), but this time it’s for an entirely different reason…&lt;/p&gt;  &lt;p&gt;My wife and I had a beautiful baby girl! And, we’ve been adjusting to our new sleep schedule of only getting 2-4 hours of sleep maximum at a time. Anyone with kids understands how it is with a newborn, and now only after having one do I fully understand. After all, I was sleeping way too much before anyway.&lt;/p&gt;  &lt;p&gt;Things have been going absolutely wonderful!&lt;/p&gt;  &lt;p&gt;I’m still trying to figure out how I’m going to have enough time to keep on blogging and learning now that I have most of my time dedicated elsewhere. One thing I don’t want to do is completely disappear from the web, like I’ve seen other tech bloggers do after a major personal life change such as this. So, I’ll just keep on blogging here and there, and maybe I’ll still be able to improve the quality of my posts.&lt;/p&gt;  &lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nUdQD3pHhvms9dDu7VxJ7rtKZA0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nUdQD3pHhvms9dDu7VxJ7rtKZA0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nUdQD3pHhvms9dDu7VxJ7rtKZA0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nUdQD3pHhvms9dDu7VxJ7rtKZA0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=UoAtt1YRL9g:ETP8fIU1l5U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=UoAtt1YRL9g:ETP8fIU1l5U:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=UoAtt1YRL9g:ETP8fIU1l5U:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=UoAtt1YRL9g:ETP8fIU1l5U:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=UoAtt1YRL9g:ETP8fIU1l5U:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/UoAtt1YRL9g" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/09/24/ITS-A-GIRL.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/09/24/ITS-A-GIRL.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=2748181a-4a5e-49c8-bc78-eaca5a664b18</guid>
      <pubDate>Thu, 24 Sep 2009 06:09:00 -0600</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=2748181a-4a5e-49c8-bc78-eaca5a664b18</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=2748181a-4a5e-49c8-bc78-eaca5a664b18</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/09/24/ITS-A-GIRL.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=2748181a-4a5e-49c8-bc78-eaca5a664b18</wfw:commentRss>
    </item>
    <item>
      <title>Simplovation Web.Maps.VE v3.0 Now With FREE Edition!</title>
      <description>&lt;p&gt;&lt;a href="http://simplovation.com"&gt;&lt;img style="float: right;margin: 3px;" src="http://simplovation.com/Files/Images/FocusAreaScreenshot.png" border="0" alt="Simplovation Web.Maps.VE v3.0!" /&gt;&lt;/a&gt;Today, I just posted the latest Web.Maps.VE v3.0 release. The coolest thing about this new version is that is has a FREE Edition for non-commercial use!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://simplovation.com/download/"&gt;Download Web.Maps.VE v3.0 FREE Edition!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are a few new things in this latest release, but the most significant are the following performance updates:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; Microsoft CDN (Content Delivery Network) Support Added. This helps improve the Bing Maps content delivery speed by up to 82%&lt;/li&gt;
&lt;li&gt;JavaScript Performance Optimizations. All the JavaScript code internally within the control has been optimized to increase the overall speed of the Web.Maps.VE Map controls functionality.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt; Check out the following link to see what has all been included in this release:&lt;br /&gt; &lt;a href="https://simplovation.com/page/webmapsve30/roadmap.aspx"&gt;https://simplovation.com/page/webmapsve30/roadmap.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, this new version release is a completely FREE upgrade to all existing customers who have already purchased Web.Maps.VE v2.0. If you have previously purchased v2.0, then there is nothing required to obtain your v3.0 license other than going to the "&lt;a href="http://simplovation.com/mylicenses/"&gt;My Licenses&lt;/a&gt;" page to download the DLL and License Activation File. If for some reason you have trouble obtaining your Free Upgrade to v3.0, please let us know and we'll get it activated as soon as possible.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iqHC9j5tlE9eOARAlneXvdvgsWY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iqHC9j5tlE9eOARAlneXvdvgsWY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iqHC9j5tlE9eOARAlneXvdvgsWY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iqHC9j5tlE9eOARAlneXvdvgsWY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=RjfYsDs5tvE:iWqmbjrgKI4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=RjfYsDs5tvE:iWqmbjrgKI4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=RjfYsDs5tvE:iWqmbjrgKI4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=RjfYsDs5tvE:iWqmbjrgKI4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=RjfYsDs5tvE:iWqmbjrgKI4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/RjfYsDs5tvE" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/08/26/Simplovation-WebMapsVE-v30-Now-With-FREE-Edition!.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/08/26/Simplovation-WebMapsVE-v30-Now-With-FREE-Edition!.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=e5800ac8-e5f7-442c-911e-00af6951462d</guid>
      <pubDate>Wed, 26 Aug 2009 18:57:00 -0600</pubDate>
      <category>asp.net</category>
      <category>Bing Maps</category>
      <category>JavaScript</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=e5800ac8-e5f7-442c-911e-00af6951462d</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=e5800ac8-e5f7-442c-911e-00af6951462d</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/08/26/Simplovation-WebMapsVE-v30-Now-With-FREE-Edition!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=e5800ac8-e5f7-442c-911e-00af6951462d</wfw:commentRss>
    </item>
    <item>
      <title>Microsoft Killed the Virtual Earth ASP.NET Control</title>
      <description>&lt;p&gt;Yesterday, Chris Pendleton officially announced that the &lt;a href="http://www.bing.com/community/blogs/maps/archive/2009/08/21/the-future-of-the-virtual-earth-asp-net-control.aspx" target="_blank"&gt;Microsoft Virtual Earth ASP.NET Control is now Dead&lt;/a&gt;. Frankly, I&amp;rsquo;ve considered it &amp;ldquo;dead&amp;rdquo; for a long time now since it didn&amp;rsquo;t get updated much, didn&amp;rsquo;t have a completely full feature support, has a few bugs AND you couldn&amp;rsquo;t use it within your applications because it was just a Preview (CTP) anyway.&lt;/p&gt;
&lt;p&gt;There are however a few good things to point out in the light of &lt;a href="http://www.bing.com/community/blogs/maps/archive/2009/08/21/the-future-of-the-virtual-earth-asp-net-control.aspx" target="_blank"&gt;Microsoft killing its Virtual Earth ASP.NET Control&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a href="http://simplovation.com" target="_blank"&gt;Simplovation Web.Maps.VE Bing Maps ASP.NET AJAX Server Control is Fully Supported and has Regular Updates&lt;/a&gt;. Plus you&amp;rsquo;ve always been allowed to use it within your applications, unlike Microsoft&amp;rsquo;s control. &lt;/li&gt;
&lt;li&gt;The &lt;a href="http://connect.microsoft.com/silverlightmapcontrolCTP" target="_blank"&gt;Bing Maps Silverlight Control&lt;/a&gt; is &amp;ldquo;The Future&amp;rdquo; for Bing Maps once it finally gets released sometime in the hopefully new future. &lt;/li&gt;
&lt;li&gt;And lastly, it looks like John O&amp;rsquo;Brien from &lt;a href="http://www.soulsolutions.com.au/" target="_blank"&gt;Soul Solutions&lt;/a&gt; is going to be releasing the Microsoft code on &lt;a href="http://bingmapsasp.codeplex.com/" target="_blank"&gt;CodePlex&lt;/a&gt;; however it will NOT be supported and will most likely NOT have regular updates. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you were previously a fan of Microsoft&amp;rsquo;s control, then I recommend you check out the &lt;a href="http://simplovation.com" target="_blank"&gt;Simplovation Web.Maps.VE&lt;/a&gt; control. The licensing cost of the Simplovation control is &lt;a href="http://simplovation.com/buynow/#Web.Maps.VE%202.0"&gt;fairly low&lt;/a&gt; and sold on a &amp;ldquo;per developer&amp;rdquo; basis. A single developer can purchase a single license and then use the &lt;a href="http://simplovation.com"&gt;Simplovation Web.Maps.VE&lt;/a&gt; control within as many (unlimited) applications as he wants/needs. Plus, the &lt;a href="http://simplovation.com"&gt;Simplovation Web.Maps.VE&lt;/a&gt; component can be redistributed along with any of those applications royalty free.&lt;/p&gt;
&lt;p&gt;Go check it out: &lt;a href="http://simplovation.com"&gt;http://simplovation.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update 8/23/2009: John has created the &lt;/em&gt;&lt;a href="http://codeplex.com" target="_blank"&gt;&lt;em&gt;CodePlex&lt;/em&gt;&lt;/a&gt;&lt;em&gt; project to contain the source code for Microsoft&amp;rsquo;s control. &lt;/em&gt;&lt;a title="http://bingmapsasp.codeplex.com/" href="http://bingmapsasp.codeplex.com/"&gt;&lt;em&gt;http://bingmapsasp.codeplex.com/&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-EFJJwAzdPsUsAVwNcYHqAXIOmQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-EFJJwAzdPsUsAVwNcYHqAXIOmQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-EFJJwAzdPsUsAVwNcYHqAXIOmQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-EFJJwAzdPsUsAVwNcYHqAXIOmQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=xvJyfw1d_yY:g1nQMcYW-TY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=xvJyfw1d_yY:g1nQMcYW-TY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=xvJyfw1d_yY:g1nQMcYW-TY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=xvJyfw1d_yY:g1nQMcYW-TY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=xvJyfw1d_yY:g1nQMcYW-TY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/xvJyfw1d_yY" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/08/22/Microsoft-Killed-the-Virtual-Earth-ASPNET-Control.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/08/22/Microsoft-Killed-the-Virtual-Earth-ASPNET-Control.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=ed7aa020-e1b3-4783-8f3f-d1af9d3a0b54</guid>
      <pubDate>Sat, 22 Aug 2009 10:52:00 -0600</pubDate>
      <category>asp.net</category>
      <category>Bing Maps</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=ed7aa020-e1b3-4783-8f3f-d1af9d3a0b54</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=ed7aa020-e1b3-4783-8f3f-d1af9d3a0b54</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/08/22/Microsoft-Killed-the-Virtual-Earth-ASPNET-Control.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=ed7aa020-e1b3-4783-8f3f-d1af9d3a0b54</wfw:commentRss>
    </item>
    <item>
      <title>jHtmlArea – Adding Custom Toolbar Buttons</title>
      <description>&lt;p&gt;I’ve gotten a couple questions lately about extending the &lt;a href="http://jhtmlarea.codeplex.com/" target="_blank"&gt;jHtmlArea WYSIWYG editor&lt;/a&gt;, so I thought I’d post a little bit about how to add your own custom toolbar buttons to it. There is one example that is included with the component, but that doesn’t cover inserting some html into the editor, so I’m going to cover that here.&lt;/p&gt;  &lt;p&gt;You can download the jHtmlArea Editor here: &lt;a title="http://jhtmlarea.codeplex.com/Release/ProjectReleases.aspx" href="http://jhtmlarea.codeplex.com/Release/ProjectReleases.aspx"&gt;http://jhtmlarea.codeplex.com/Release/ProjectReleases.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This article was written with jHtmlArea v0.6.0 in mind, but it will work with newer releases.&lt;/p&gt;  &lt;h3&gt;Add a simple Custom Toolbar Button&lt;/h3&gt;  &lt;p&gt;As the &lt;a href="http://jhtmlarea.codeplex.com/" target="_blank"&gt;jHtmlArea&lt;/a&gt; samples show you can specify your own list of toolbar buttons to display at the time of initializing the editor. You do this by passing in the “toolbar” option with an array of toolbar button groups (“Arrays”) that include the toolbar buttons. The editor has a bunch of buttons built in and those are specified by name. But, to add a custom toolbar button, you just need to pass in a simple JavaScript object that defines the button.&lt;/p&gt;  &lt;p&gt;Here’s an example object literal that can be used to create the custom toolbar button:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;{
    css: &lt;span class="str"&gt;&amp;quot;custombutton&amp;quot;&lt;/span&gt;, &lt;span class="rem"&gt;// The CSS class used to Style the &amp;lt;A&amp;gt; tag of the Toolbar Button&lt;/span&gt;
    test: &lt;span class="str"&gt;&amp;quot;Custom Button Tooltip&amp;quot;&lt;/span&gt;, &lt;span class="rem"&gt;// The text to use as the &amp;lt;A&amp;gt; tags &amp;quot;Alt&amp;quot; attribute, or tooltip&lt;/span&gt;
    action: &lt;span class="kwrd"&gt;function&lt;/span&gt;(btn) { &lt;span class="rem"&gt;// The function to execute when the Toolbar Button is Clicked&lt;/span&gt;
        &lt;span class="rem"&gt;// 'this' = jHtmlArea Object&lt;/span&gt;
        &lt;span class="rem"&gt;// 'btn' = jQuery object that represents the &amp;lt;A&amp;gt; &amp;quot;anchor&amp;quot; tag for the Toolbar Button&lt;/span&gt;

        &lt;span class="rem"&gt;// Take some action or Do Something Here&lt;/span&gt;
    }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;As you can see it’s really pretty straight forward to define a custom toolbar button. Now to include the Custom Toolbar Button, you can send it in the “toolbar” option with all the other buttons you want displayed. Here’s an example that specifies a few of the built in toolbar buttons along with a new Custom Toolbar Button:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;$(&lt;span class="str"&gt;&amp;quot;textarea&amp;quot;&lt;/span&gt;).htmlarea({
    &lt;span class="rem"&gt;// Override/Specify the Toolbar buttons to show&lt;/span&gt;
    toolbar: [
        [&lt;span class="str"&gt;&amp;quot;html&amp;quot;&lt;/span&gt;], [&lt;span class="str"&gt;&amp;quot;bold&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;italic&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;underline&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;|&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;forecolor&amp;quot;&lt;/span&gt;],
        [&lt;span class="str"&gt;&amp;quot;h1&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;h2&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;h3&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;h4&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;h5&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;h6&amp;quot;&lt;/span&gt;],
        [&lt;span class="str"&gt;&amp;quot;link&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;unlink&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;|&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;image&amp;quot;&lt;/span&gt;],
        [{
            &lt;span class="rem"&gt;// This is how to add a completely custom Toolbar Button&lt;/span&gt;
            css: &lt;span class="str"&gt;&amp;quot;datebutton&amp;quot;&lt;/span&gt;,
            text: &lt;span class="str"&gt;&amp;quot;Today's Date&amp;quot;&lt;/span&gt;,
            action: &lt;span class="kwrd"&gt;function&lt;/span&gt;(btn) {
                &lt;span class="rem"&gt;// 'this' = jHtmlArea object&lt;/span&gt;
                &lt;span class="rem"&gt;// 'btn' = jQuery object that represents the &amp;lt;A&amp;gt; &amp;quot;anchor&amp;quot; tag for the Toolbar Button&lt;/span&gt;

                &lt;span class="rem"&gt;// Take some action or Do Something Here&lt;/span&gt;
            }
        }]
    ]
});&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;A couple things to note when specifying the custom set of Toolbar Buttons to display:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A Custom Toolbar Button is specified by passing in a JavaScript Object that has the “css”, “text” and “action” properties set accordingly. As shown above.&lt;/li&gt;

  &lt;li&gt;The “toolbar” option accespts an Array of Arrays. This allows for you to specify as many Toolbar Button Groups as you want. These Toolbar Button Groups will auto-wrap to the next line if they cannot all be displayed on the same line because of the width of the editor being too small. If you include ALL your buttons in a single group, then they will not wrap.&lt;/li&gt;

  &lt;li&gt;You can specify the “built in” Toolbar Buttons by “name”. To look what the names are, just reference the “jHtmlArea.defaultOptions” objects “toolbar” property as this is a full list of all the “built in” buttons.&lt;/li&gt;

  &lt;li&gt;To specify a “Separator” or vertical line to display in between the buttons within the same group, just specify a vertical pipe (“|”) character as the “name” of the toolbar button to display, and the editor will take care of the rest.&lt;/li&gt;
&lt;/ul&gt;

&lt;ul&gt;Also do not forget to specify the CSS class you are telling the editor to use for the Custom Toolbar Button. You can see an example of this with the Custom “Save” Toolbar Button that is contained within the “default.htm” file that comes with the jHtmlArea editor download zip file.&lt;/ul&gt;

&lt;h3&gt;Performing Basic Actions from a Custom Toolbar Button&lt;/h3&gt;

&lt;p&gt;Something that was omitted from the above example was how to actually perform some action on the editor. You can actually call any of the jHtmlArea objects methods from within the Custom Toolbar Buttons “action” method to perform some kind of manpulation or action on the editor. The jHtmlArea editor object is passed to the “action” method as the “this” keyword so it can be accessed directly without needing to curry any variables.&lt;/p&gt;

&lt;p&gt;Here are some of the methods that you can call with a note as to what they do. You can find more within the jHtmlArea’s script file, or with documentation comments within the “-vsdoc.js” file.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;{
    css: &lt;span class="str"&gt;&amp;quot;custombutton&amp;quot;&lt;/span&gt;,
    text: &lt;span class="str"&gt;&amp;quot;Custom Toolbar Button&amp;quot;&lt;/span&gt;,
    action: &lt;span class="kwrd"&gt;function&lt;/span&gt;(btn) {

        &lt;span class="rem"&gt;// Paste some specific HTML / Text value into the Editor&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.pasteHTML(&lt;span class="str"&gt;&amp;quot;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;&lt;/span&gt;);

        &lt;span class="rem"&gt;// Get the currently selected HTML / Text within the Editor&lt;/span&gt;
        &lt;span class="kwrd"&gt;var&lt;/span&gt; s = &lt;span class="kwrd"&gt;this&lt;/span&gt;.getSelectedHTML();

        &lt;span class="rem"&gt;// Set the current selection to Bold&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.bold();

        &lt;span class="rem"&gt;// Set the current selection to Italic&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.italic();

        &lt;span class="rem"&gt;// Set the current selection to Underline&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.underline();

        &lt;span class="rem"&gt;// Center Justify the current selection&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.justifyCenter();

        &lt;span class="rem"&gt;// Indent the current selection&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.indent();

        &lt;span class="rem"&gt;// Insert horizontal rule or &amp;lt;hr&amp;gt; tag&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.insertHorizontalRule();

        &lt;span class="rem"&gt;// Insert an Image by URL&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.image(&lt;span class="str"&gt;&amp;quot;http://domain/image.png&amp;quot;&lt;/span&gt;);

        &lt;span class="rem"&gt;// Set the Forecolor / Text Color of the current selection&lt;/span&gt;
        &lt;span class="kwrd"&gt;this&lt;/span&gt;.forecolor(&lt;span class="str"&gt;&amp;quot;#336699&amp;quot;&lt;/span&gt;);

        &lt;span class="rem"&gt;// Get the Full HTML that's contained within the Editor&lt;/span&gt;
        &lt;span class="kwrd"&gt;var&lt;/span&gt; html = &lt;span class="kwrd"&gt;this&lt;/span&gt;.toHtmlString();
    }
}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;One thing to note about using “pasteHTML” to insert your own custom HTML string into the editor, is because of the way the browsers handle comment tag (“&amp;lt;!-- --&amp;gt;”) they wont pasted/inserted and no exceptions will be raised. The reason I mention this is because I got a question from someone about inserting “&amp;lt;!—more—&amp;gt;” into the Editor.&lt;/p&gt;

&lt;p&gt;Also the “btn” argument that’s passed to the “action” method is a reference to the jQuery object for the &amp;lt;A&amp;gt; “anchor” tag that is contained within the Custom Toolbar Button. This allows you to modify it’s CSS styles or absolute position an element near it, similarly to how the “jHtmlArea.ColorPickerMenu” extension does.&lt;/p&gt;

&lt;h3&gt;Append the Custom Toolbar Button to the “Default” Toolbar Button Set&lt;/h3&gt;

&lt;p&gt;You can append any Custom Toolbar Buttons you want to the “Default” Toolbar Button Set if you wish for those Custom Toolbar Buttons to be shown on ALL jHtmlArea editors on the Page. To do this you can just append a new Toolbar Button Group to the “jHtmlArea.defaultOptions.toolbar” array. However, make sure you do this before initializing an instance of jHtmlArea, otherwise the button will not be displayed.&lt;/p&gt;

&lt;p&gt;Here’s an example that demonstrates appending a Custom Toolbar Button that&amp;#160; pasted the current days date into the editor when clicked:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;jHtmlArea.defaultOptions.toolbar.push([
    {
        &lt;span class="rem"&gt;// This is how to add a completely custom Toolbar Button&lt;/span&gt;
        css: &lt;span class="str"&gt;&amp;quot;datebutton&amp;quot;&lt;/span&gt;,
        text: &lt;span class="str"&gt;&amp;quot;Today's Date&amp;quot;&lt;/span&gt;,
        action: &lt;span class="kwrd"&gt;function&lt;/span&gt;(btn) {
            &lt;span class="rem"&gt;// 'this' = jHtmlArea object&lt;/span&gt;
            &lt;span class="rem"&gt;// 'btn' = jQuery object that represents the &amp;lt;A&amp;gt; &amp;quot;anchor&amp;quot; tag for the Toolbar Button&lt;/span&gt;

            &lt;span class="kwrd"&gt;var&lt;/span&gt; m_names = &lt;span class="kwrd"&gt;new&lt;/span&gt; Array(&lt;span class="str"&gt;&amp;quot;January&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;February&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;March&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;April&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;May&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;June&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;July&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;August&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;September&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;October&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;November&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;December&amp;quot;&lt;/span&gt;);

            &lt;span class="kwrd"&gt;var&lt;/span&gt; d = &lt;span class="kwrd"&gt;new&lt;/span&gt; Date();
            &lt;span class="kwrd"&gt;var&lt;/span&gt; curr_date = d.getDate();
            &lt;span class="kwrd"&gt;var&lt;/span&gt; curr_month = d.getMonth();
            &lt;span class="kwrd"&gt;var&lt;/span&gt; curr_year = d.getFullYear();
            &lt;span class="kwrd"&gt;this&lt;/span&gt;.pasteHTML(m_names[curr_month] + &lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt; + curr_date + &lt;span class="str"&gt;&amp;quot;, &amp;quot;&lt;/span&gt; + curr_year);
        }
    }
]);&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/67hrBywgM7LLJJXmCZ2TDNYL3Ww/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/67hrBywgM7LLJJXmCZ2TDNYL3Ww/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/67hrBywgM7LLJJXmCZ2TDNYL3Ww/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/67hrBywgM7LLJJXmCZ2TDNYL3Ww/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=mYGWNKiwKnA:jjGdqXi63Bk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=mYGWNKiwKnA:jjGdqXi63Bk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=mYGWNKiwKnA:jjGdqXi63Bk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=mYGWNKiwKnA:jjGdqXi63Bk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=mYGWNKiwKnA:jjGdqXi63Bk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/mYGWNKiwKnA" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/08/18/jHtmlArea-Adding-Custom-Toolbar-Buttons.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/08/18/jHtmlArea-Adding-Custom-Toolbar-Buttons.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=c34da319-5160-4b22-918b-bfea938271ef</guid>
      <pubDate>Tue, 18 Aug 2009 17:21:15 -0600</pubDate>
      <category>jquery</category>
      <category>JavaScript</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=c34da319-5160-4b22-918b-bfea938271ef</pingback:target>
      <slash:comments>16</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=c34da319-5160-4b22-918b-bfea938271ef</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/08/18/jHtmlArea-Adding-Custom-Toolbar-Buttons.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=c34da319-5160-4b22-918b-bfea938271ef</wfw:commentRss>
    </item>
    <item>
      <title>C#: Using IProgressDialog to show a “native” Progress Dialog from .NET in Windows</title>
      <description>&lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=CSharp-IProgressDialog-Native-dotNet-in-Windows.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="CSharp-IProgressDialog-Native-dotNet-in-Windows" border="0" alt="CSharp-IProgressDialog-Native-dotNet-in-Windows" align="right" src="http://pietschsoft.com/image.axd?picture=CSharp-IProgressDialog-Native-dotNet-in-Windows_thumb.png" width="260" height="215" /&gt;&lt;/a&gt; A &lt;a href="http://pietschsoft.com/post.aspx?id=d76a12f5-9ead-4847-b21a-be221e790681" target="_blank"&gt;few months ago I posted some code that I originally wrote back in about 2004&lt;/a&gt;… Well, I was looking through some more of my prototypes that I’ve written and I came across the following example of how to use the &lt;a href="http://msdn.microsoft.com/en-us/library/bb775248%28VS.85%29.aspx" target="_blank"&gt;IProgressDialog Win32 Interface&lt;/a&gt; to harness the power of the Built-in Progress Dialog in Windows within your own .NET applications.&lt;/p&gt;  &lt;p&gt;I have test this on WIndows 7, but it should work as expected on Windows XP and Vista. The MSDN Documentation for IProgressDialog says it’s minimum supported operating systems are Windows 2000 and Windows XP.&lt;/p&gt;  &lt;p&gt;The full source code for this example is listed below. Just copy from this post and paste it within your app to test.&lt;/p&gt;  &lt;h3&gt;“ProgressDialog” Usage Example&lt;/h3&gt;  &lt;p&gt;Here’s an example of how to use this example “ProgressDialog” class: This is an example of using it from Windows Forms, however it could be used from within WPF exactly the same way.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Windows.Forms;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; WindowsProgressDialog
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Form1 : Form
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; Form1()
        {
            InitializeComponent();
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; Pietschsoft.ProgressDialog pd;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; progressPercent;

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; button1_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
        {
            pd = &lt;span class="kwrd"&gt;new&lt;/span&gt; Pietschsoft.ProgressDialog(&lt;span class="kwrd"&gt;this&lt;/span&gt;.Handle);
            pd.Title = &lt;span class="str"&gt;&amp;quot;Performing Operation&amp;quot;&lt;/span&gt;;
            pd.CancelMessage = &lt;span class="str"&gt;&amp;quot;Please wait while the operation is cancelled&amp;quot;&lt;/span&gt;;
            pd.Maximum = 100;
            pd.Value = 0;
            pd.Line1 = &lt;span class="str"&gt;&amp;quot;Line One&amp;quot;&lt;/span&gt;;
            pd.Line3 = &lt;span class="str"&gt;&amp;quot;Calculating Time Remaining...&amp;quot;&lt;/span&gt;;
            
            &lt;span class="rem"&gt;//pd.ShowDialog(); // Defaults to PROGDLG.Normal&lt;/span&gt;
            pd.ShowDialog(Pietschsoft.ProgressDialog.PROGDLG.Modal, Pietschsoft.ProgressDialog.PROGDLG.AutoTime, Pietschsoft.ProgressDialog.PROGDLG.NoMinimize);

            progressPercent = 0;
            timer1.Start();
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; timer1_Tick(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
        {
            progressPercent++;

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd.HasUserCancelled)
            {
                timer1.Stop();
                pd.CloseDialog();
            }
            &lt;span class="kwrd"&gt;else&lt;/span&gt;
            {
                &lt;span class="rem"&gt;// Update the progress value&lt;/span&gt;
                pd.Value = progressPercent;

                pd.Line2 = &lt;span class="str"&gt;&amp;quot;Percent &amp;quot;&lt;/span&gt; + progressPercent.ToString() + &lt;span class="str"&gt;&amp;quot;%&amp;quot;&lt;/span&gt;;

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (progressPercent &amp;gt;= 100)
                {
                    timer1.Stop();
                    pd.CloseDialog();
                }
            }
        }
    }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;h3&gt;&amp;#160;&lt;/h3&gt;

&lt;h3&gt;“ProgressDialog” Class&lt;/h3&gt;

&lt;p&gt;And, here’s the full code for the “ProgressDialog” class itself:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Runtime.InteropServices;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Pietschsoft
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ProgressDialog
    {
        &lt;span class="kwrd"&gt;private&lt;/span&gt; IntPtr _parentHandle;

        &lt;span class="kwrd"&gt;private&lt;/span&gt; Win32IProgressDialog pd = &lt;span class="kwrd"&gt;null&lt;/span&gt;;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; ProgressDialog(IntPtr parentHandle)
        {
            &lt;span class="kwrd"&gt;this&lt;/span&gt;._parentHandle = parentHandle;
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ShowDialog(&lt;span class="kwrd"&gt;params&lt;/span&gt; PROGDLG[] flags)
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
            {
                pd = (Win32IProgressDialog)&lt;span class="kwrd"&gt;new&lt;/span&gt; Win32ProgressDialog();
                
                pd.SetTitle(&lt;span class="kwrd"&gt;this&lt;/span&gt;._Title);
                pd.SetCancelMsg(&lt;span class="kwrd"&gt;this&lt;/span&gt;._CancelMessage, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
                pd.SetLine(1, &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line1, &lt;span class="kwrd"&gt;false&lt;/span&gt;, IntPtr.Zero);
                pd.SetLine(2, &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line2, &lt;span class="kwrd"&gt;false&lt;/span&gt;, IntPtr.Zero);
                pd.SetLine(3, &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line3, &lt;span class="kwrd"&gt;false&lt;/span&gt;, IntPtr.Zero);

                PROGDLG dialogFlags = PROGDLG.Normal;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (flags.Length != 0)
                {
                    dialogFlags = flags[0];
                    &lt;span class="kwrd"&gt;for&lt;/span&gt; (var i = 1; i &amp;lt; flags.Length; i++)
                    {
                        dialogFlags = dialogFlags | flags[i];
                    }
                }
                
                pd.StartProgressDialog(&lt;span class="kwrd"&gt;this&lt;/span&gt;._parentHandle, &lt;span class="kwrd"&gt;null&lt;/span&gt;, dialogFlags, IntPtr.Zero);
            }
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; CloseDialog()
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
            {
                pd.StopProgressDialog();
                &lt;span class="rem"&gt;//Marshal.ReleaseComObject(pd);&lt;/span&gt;
                pd = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
            }
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; _Title = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Title
        {
            get
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;._Title;
            }
            set
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;._Title = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    pd.SetTitle(&lt;span class="kwrd"&gt;this&lt;/span&gt;._Title);
                }
            }
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; _CancelMessage = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; CancelMessage
        {
            get
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;._CancelMessage;
            }
            set
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;._CancelMessage = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    pd.SetCancelMsg(&lt;span class="kwrd"&gt;this&lt;/span&gt;._CancelMessage, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
                }
            }
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; _Line1 = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Line1
        {
            get
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line1;
            }
            set
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line1 = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    pd.SetLine(1, &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line1, &lt;span class="kwrd"&gt;false&lt;/span&gt;, IntPtr.Zero);
                }
            }
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; _Line2 = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Line2
        {
            get
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line2;
            }
            set
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line2 = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    pd.SetLine(2, &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line2, &lt;span class="kwrd"&gt;false&lt;/span&gt;, IntPtr.Zero);
                }
            }
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; _Line3 = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Line3
        {
            get
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line3;
            }
            set
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line3 = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    pd.SetLine(3, &lt;span class="kwrd"&gt;this&lt;/span&gt;._Line3, &lt;span class="kwrd"&gt;false&lt;/span&gt;, IntPtr.Zero);
                }
            }
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; _value = 0;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; Value
        {
            get
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;._value;
            }
            set
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;._value = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    pd.SetProgress(&lt;span class="kwrd"&gt;this&lt;/span&gt;._value, &lt;span class="kwrd"&gt;this&lt;/span&gt;._maximum);
                }
            }
        }

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; _maximum = 100;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;uint&lt;/span&gt; Maximum
        {
            get
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;._maximum;
            }
            set
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;._maximum = &lt;span class="kwrd"&gt;value&lt;/span&gt;;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    pd.SetProgress(&lt;span class="kwrd"&gt;this&lt;/span&gt;._value, &lt;span class="kwrd"&gt;this&lt;/span&gt;._maximum);
                }
            }
        }
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; HasUserCancelled
        {
            get
            {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (pd != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                {
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; pd.HasUserCancelled();
                }
                &lt;span class="kwrd"&gt;else&lt;/span&gt;
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
            }
        }

        &lt;span class="preproc"&gt;#region&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Win32 Stuff&amp;quot;&lt;/span&gt;
        &lt;span class="rem"&gt;// The below was copied from: http://pinvoke.net/default.aspx/Interfaces/IProgressDialog.html&lt;/span&gt;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; shlwapi
        {
            [DllImport(&lt;span class="str"&gt;&amp;quot;shlwapi.dll&amp;quot;&lt;/span&gt;, CharSet = CharSet.Auto)]
            &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;extern&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; PathCompactPath(IntPtr hDC, [In, Out] StringBuilder pszPath, &lt;span class="kwrd"&gt;int&lt;/span&gt; dx);
        }

        [ComImport]
        [Guid(&lt;span class="str"&gt;&amp;quot;EBBC7C04-315E-11d2-B62F-006097DF5BD4&amp;quot;&lt;/span&gt;)]
        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;interface&lt;/span&gt; Win32IProgressDialog
        {
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Starts the progress dialog box.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;hwndParent&amp;quot;&amp;gt;A handle to the dialog box's parent window.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;punkEnableModless&amp;quot;&amp;gt;Reserved. Set to null.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;dwFlags&amp;quot;&amp;gt;Flags that control the operation of the progress dialog box. &amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;pvResevered&amp;quot;&amp;gt;Reserved. Set to IntPtr.Zero&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; StartProgressDialog(
                IntPtr hwndParent, &lt;span class="rem"&gt;//HWND&lt;/span&gt;
                [MarshalAs(UnmanagedType.IUnknown)]    &lt;span class="kwrd"&gt;object&lt;/span&gt; punkEnableModless, &lt;span class="rem"&gt;//IUnknown&lt;/span&gt;
                PROGDLG dwFlags,  &lt;span class="rem"&gt;//DWORD&lt;/span&gt;
                IntPtr pvResevered &lt;span class="rem"&gt;//LPCVOID&lt;/span&gt;
                );

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Stops the progress dialog box and removes it from the screen.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; StopProgressDialog();

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Sets the title of the progress dialog box.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;pwzTitle&amp;quot;&amp;gt;A pointer to a null-terminated Unicode string that contains the dialog box title.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; SetTitle(
                [MarshalAs(UnmanagedType.LPWStr)] &lt;span class="kwrd"&gt;string&lt;/span&gt; pwzTitle &lt;span class="rem"&gt;//LPCWSTR&lt;/span&gt;
                );

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Specifies an Audio-Video Interleaved (AVI) clip that runs in the dialog box. Note: Note  This method is not supported in Windows Vista or later versions.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;hInstAnimation&amp;quot;&amp;gt;An instance handle to the module from which the AVI resource should be loaded.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;idAnimation&amp;quot;&amp;gt;An AVI resource identifier. To create this value, use the MAKEINTRESOURCE macro. The control loads the AVI resource from the module specified by hInstAnimation.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; SetAnimation(
                IntPtr hInstAnimation, &lt;span class="rem"&gt;//HINSTANCE&lt;/span&gt;
                &lt;span class="kwrd"&gt;ushort&lt;/span&gt; idAnimation &lt;span class="rem"&gt;//UINT&lt;/span&gt;
                );

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Checks whether the user has canceled the operation.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;TRUE if the user has cancelled the operation; otherwise, FALSE.&amp;lt;/returns&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;remarks&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// The system does not send a message to the application when the user clicks the Cancel button.&lt;/span&gt;
            &lt;span class="rem"&gt;/// You must periodically use this function to poll the progress dialog box object to determine&lt;/span&gt;
            &lt;span class="rem"&gt;/// whether the operation has been canceled.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/remarks&amp;gt;&lt;/span&gt;
            [PreserveSig]
            [&lt;span class="kwrd"&gt;return&lt;/span&gt;: MarshalAs(UnmanagedType.Bool)]
            &lt;span class="kwrd"&gt;bool&lt;/span&gt; HasUserCancelled();

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Updates the progress dialog box with the current state of the operation.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;dwCompleted&amp;quot;&amp;gt;An application-defined value that indicates what proportion of the operation has been completed at the time the method was called.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;dwTotal&amp;quot;&amp;gt;An application-defined value that specifies what value dwCompleted will have when the operation is complete.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; SetProgress(
                &lt;span class="kwrd"&gt;uint&lt;/span&gt; dwCompleted, &lt;span class="rem"&gt;//DWORD&lt;/span&gt;
                &lt;span class="kwrd"&gt;uint&lt;/span&gt; dwTotal &lt;span class="rem"&gt;//DWORD&lt;/span&gt;
                );

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Updates the progress dialog box with the current state of the operation.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;ullCompleted&amp;quot;&amp;gt;An application-defined value that indicates what proportion of the operation has been completed at the time the method was called.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;ullTotal&amp;quot;&amp;gt;An application-defined value that specifies what value ullCompleted will have when the operation is complete.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; SetProgress64(
                &lt;span class="kwrd"&gt;ulong&lt;/span&gt; ullCompleted, &lt;span class="rem"&gt;//ULONGLONG&lt;/span&gt;
                &lt;span class="kwrd"&gt;ulong&lt;/span&gt; ullTotal &lt;span class="rem"&gt;//ULONGLONG&lt;/span&gt;
                );

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Displays a message in the progress dialog.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;dwLineNum&amp;quot;&amp;gt;The line number on which the text is to be displayed. Currently there are three lines—1, 2, and 3. If the PROGDLG_AUTOTIME flag was included in the dwFlags parameter when IProgressDialog::StartProgressDialog was called, only lines 1 and 2 can be used. The estimated time will be displayed on line 3.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;pwzString&amp;quot;&amp;gt;A null-terminated Unicode string that contains the text.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;fCompactPath&amp;quot;&amp;gt;TRUE to have path strings compacted if they are too large to fit on a line. The paths are compacted with PathCompactPath.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;pvResevered&amp;quot;&amp;gt; Reserved. Set to IntPtr.Zero.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;remarks&amp;gt;This function is typically used to display a message such as &amp;quot;Item XXX is now being processed.&amp;quot; typically, messages are displayed on lines 1 and 2, with line 3 reserved for the estimated time.&amp;lt;/remarks&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; SetLine(
                &lt;span class="kwrd"&gt;uint&lt;/span&gt; dwLineNum, &lt;span class="rem"&gt;//DWORD&lt;/span&gt;
                [MarshalAs(UnmanagedType.LPWStr)] &lt;span class="kwrd"&gt;string&lt;/span&gt; pwzString, &lt;span class="rem"&gt;//LPCWSTR&lt;/span&gt;
                [MarshalAs(UnmanagedType.VariantBool)] &lt;span class="kwrd"&gt;bool&lt;/span&gt; fCompactPath, &lt;span class="rem"&gt;//BOOL&lt;/span&gt;
                IntPtr pvResevered &lt;span class="rem"&gt;//LPCVOID&lt;/span&gt;
                );

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Sets a message to be displayed if the user cancels the operation.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;pwzCancelMsg&amp;quot;&amp;gt;A pointer to a null-terminated Unicode string that contains the message to be displayed.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;pvResevered&amp;quot;&amp;gt;Reserved. Set to NULL.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;remarks&amp;gt;Even though the user clicks Cancel, the application cannot immediately call&lt;/span&gt;
            &lt;span class="rem"&gt;/// IProgressDialog::StopProgressDialog to close the dialog box. The application must wait until the&lt;/span&gt;
            &lt;span class="rem"&gt;/// next time it calls IProgressDialog::HasUserCancelled to discover that the user has canceled the&lt;/span&gt;
            &lt;span class="rem"&gt;/// operation. Since this delay might be significant, the progress dialog box provides the user with&lt;/span&gt;
            &lt;span class="rem"&gt;/// immediate feedback by clearing text lines 1 and 2 and displaying the cancel message on line 3.&lt;/span&gt;
            &lt;span class="rem"&gt;/// The message is intended to let the user know that the delay is normal and that the progress dialog&lt;/span&gt;
            &lt;span class="rem"&gt;/// box will be closed shortly.&lt;/span&gt;
            &lt;span class="rem"&gt;/// It is typically is set to something like &amp;quot;Please wait while ...&amp;quot;. &amp;lt;/remarks&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; SetCancelMsg(
                [MarshalAs(UnmanagedType.LPWStr)] &lt;span class="kwrd"&gt;string&lt;/span&gt; pwzCancelMsg, &lt;span class="rem"&gt;//LPCWSTR&lt;/span&gt;
                &lt;span class="kwrd"&gt;object&lt;/span&gt; pvResevered &lt;span class="rem"&gt;//LPCVOID&lt;/span&gt;
                );

            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// Resets the progress dialog box timer to zero.&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;dwTimerAction&amp;quot;&amp;gt;Flags that indicate the action to be taken by the timer.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;pvResevered&amp;quot;&amp;gt;Reserved. Set to NULL.&amp;lt;/param&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;remarks&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// The timer is used to estimate the remaining time. It is started when your application&lt;/span&gt;
            &lt;span class="rem"&gt;/// calls IProgressDialog::StartProgressDialog. Unless your application will start immediately,&lt;/span&gt;
            &lt;span class="rem"&gt;/// it should call Timer just before starting the operation.&lt;/span&gt;
            &lt;span class="rem"&gt;/// This practice ensures that the time estimates will be as accurate as possible. This method&lt;/span&gt;
            &lt;span class="rem"&gt;/// should not be called after the first call to IProgressDialog::SetProgress.&amp;lt;/remarks&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;void&lt;/span&gt; Timer(
                PDTIMER dwTimerAction, &lt;span class="rem"&gt;//DWORD&lt;/span&gt;
                &lt;span class="kwrd"&gt;object&lt;/span&gt; pvResevered &lt;span class="rem"&gt;//LPCVOID&lt;/span&gt;
                );

        }

        [ComImport]
        [Guid(&lt;span class="str"&gt;&amp;quot;F8383852-FCD3-11d1-A6B9-006097DF5BD4&amp;quot;&lt;/span&gt;)]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Win32ProgressDialog
        {
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Flags that indicate the action to be taken by the ProgressDialog.SetTime() method.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;enum&lt;/span&gt; PDTIMER : &lt;span class="kwrd"&gt;uint&lt;/span&gt; &lt;span class="rem"&gt;//DWORD&lt;/span&gt;
        {
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;Resets the timer to zero. Progress will be calculated from the time this method is called.&amp;lt;/summary&amp;gt;&lt;/span&gt;
            Reset = (0x01),
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;Progress has been suspended.&amp;lt;/summary&amp;gt;&lt;/span&gt;
            Pause = (0x02),
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;Progress has been resumed.&amp;lt;/summary&amp;gt;&lt;/span&gt;
            Resume = (0x03)
        }

        [Flags]
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;enum&lt;/span&gt; PROGDLG : &lt;span class="kwrd"&gt;uint&lt;/span&gt; &lt;span class="rem"&gt;//DWORD&lt;/span&gt;
        {
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;Normal progress dialog box behavior.&amp;lt;/summary&amp;gt;&lt;/span&gt;
            Normal = 0x00000000,
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;The progress dialog box will be modal to the window specified by hwndParent. By default, a progress dialog box is modeless.&amp;lt;/summary&amp;gt;&lt;/span&gt;
            Modal = 0x00000001,
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;Automatically estimate the remaining time and display the estimate on line 3. &amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;remarks&amp;gt;If this flag is set, IProgressDialog::SetLine can be used only to display text on lines 1 and 2.&amp;lt;/remarks&amp;gt;&lt;/span&gt;
            AutoTime = 0x00000002,
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;Do not show the &amp;quot;time remaining&amp;quot; text.&amp;lt;/summary&amp;gt;&lt;/span&gt;
            NoTime = 0x00000004,
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;Do not display a minimize button on the dialog box's caption bar.&amp;lt;/summary&amp;gt;&lt;/span&gt;
            NoMinimize = 0x00000008,
            &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;Do not display a progress bar.&amp;lt;/summary&amp;gt;&lt;/span&gt;
            &lt;span class="rem"&gt;/// &amp;lt;remarks&amp;gt;Typically, an application can quantitatively determine how much of the operation remains and periodically pass that value to IProgressDialog::SetProgress. The progress dialog box uses this information to update its progress bar. This flag is typically set when the calling application must wait for an operation to finish, but does not have any quantitative information it can use to update the dialog box.&amp;lt;/remarks&amp;gt;&lt;/span&gt;
            NoProgressBar = 0x00000010
        }
        &lt;span class="preproc"&gt;#endregion&lt;/span&gt;
    }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lgW6BNLMwTmT8oe8RHhRrHCzOQc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lgW6BNLMwTmT8oe8RHhRrHCzOQc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lgW6BNLMwTmT8oe8RHhRrHCzOQc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lgW6BNLMwTmT8oe8RHhRrHCzOQc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lCyyjHmGhbo:Yu5L51bayfw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lCyyjHmGhbo:Yu5L51bayfw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=lCyyjHmGhbo:Yu5L51bayfw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=lCyyjHmGhbo:Yu5L51bayfw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=lCyyjHmGhbo:Yu5L51bayfw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/lCyyjHmGhbo" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/08/17/CSharp-IProgressDialog-Show-Native-Progress-Dialog-from-dotNet-in-Windows.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/08/17/CSharp-IProgressDialog-Show-Native-Progress-Dialog-from-dotNet-in-Windows.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=8cdbe666-e375-4311-b6ca-4794ec44ff41</guid>
      <pubDate>Mon, 17 Aug 2009 20:03:31 -0600</pubDate>
      <category>C#</category>
      <category>Win32API</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=8cdbe666-e375-4311-b6ca-4794ec44ff41</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=8cdbe666-e375-4311-b6ca-4794ec44ff41</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/08/17/CSharp-IProgressDialog-Show-Native-Progress-Dialog-from-dotNet-in-Windows.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=8cdbe666-e375-4311-b6ca-4794ec44ff41</wfw:commentRss>
    </item>
    <item>
      <title>A Simple ScriptManager for ASP.NET MVC</title>
      <description>&lt;p&gt;The &lt;a href="http://www.asp.net/Ajax/Documentation/Live/overview/ScriptManagerOverview.aspx" target="_blank"&gt;ASP.NET AJAX ScriptManager&lt;/a&gt; makes it really easy to include JavaScript references and register JavaScript blocks into the rendered Page output of an ASP.NET WebForms application. However nice the ScriptManager control is, it’s still just a WebForms control for use with ASP.NET AJAX; thus it’s use isn’t really supported with ASP.NET MVC. Also, to make things just a little more difficult, ASP.NET MVC doesn’t have it’s own “ScriptManager” implementation. This brings me to the point of posting this…&lt;/p&gt;  &lt;p&gt;I have worked out a really simple “ScriptManager” component for use with ASP.NET MVC, and I think it works really nice to help simplify the effort of including JavaScript blocks and references in a page.&lt;/p&gt;  &lt;h3&gt;Setting up the “SimpleScriptManager” for use&lt;/h3&gt;  &lt;p&gt;To use the “SimpleScriptManager” with ASP.NET MVC you must first Import the “SimpleScriptManager” namespace into your Master Page. Then you must place a single line of code in the Master Page file at the location you want to Render the Script Includes and Blocks to the Page. In order for it to work properly, the Render code needs to be place at the very end of the Master Page; preferably just before the closing Body tag.&lt;/p&gt;  &lt;p&gt;Here’s a really short example Master Page file with the “SimpleScriptManager” namespace imported and the call to “SimpleScriptManager().Render()” located at the very end of the page just before the closing Body tag.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ Master Language=&amp;quot;C#&amp;quot; Inherits=&amp;quot;System.Web.Mvc.ViewMasterPage&amp;quot; %&amp;gt;&lt;/span&gt;

&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;-- The SimpleScriptManager Namespace must be Imported to be able to use the Html.SimpleScriptManager Extension --&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="asp"&gt;&amp;lt;%@ Import Namespace=&amp;quot;SimpleScriptManager&amp;quot; %&amp;gt;&lt;/span&gt;

&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Strict//EN&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;TitleContent&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;../../Content/Site.css&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/css&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:ContentPlaceHolder&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MainContent&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    
    &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;-- Render all the Scripts to the Page --&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;-- Must be located at the very end of the Master Page to work properly --&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Html.SimpleScriptManager().Render(); &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;This may look a little strange to you since you may be used to placing all your JavaScript Blocks and Script Includes at the top of the page within the &amp;lt;HEAD&amp;gt; tags. However, in order for the “SimpleScriptManager” to work property the call to Render to the page MUST be located at the end of the Master Page file. This allows any other server controls, user controls or pages to add Script Blocks and Includes at any time during the process or building/rendering the page, and then at the end of the Master Page (when the page is just about finished being rendered) the “SimpleScriptManager().Render()” method is called and the scripts are all rendered out to the page at that time. If the “&amp;quot;SimpleScriptManager().Render()” method is called prior to all other components on the Page, then any Script Blocks or Includes added to the “SimpleScriptManager” after Render is called will not be included within the final rendering of the Page that gets sent to the client.&lt;/p&gt;

&lt;h3&gt;Using the “SimpleScriptManager”&lt;/h3&gt;

&lt;p&gt;The “SimpleScriptManager” has only two fairly simple methods: ScriptInclude and Script.&lt;/p&gt;

&lt;h4&gt;“SimpleScriptManager.ScriptInclude” Method&lt;/h4&gt;

&lt;p&gt;To add a simple Script Include within the page, you just call the “ScriptManager.ScriptInclude” method and pass in the Location / Url of the JavaScript file to include within the page. The Script Location / Url can be either an Absolute or Virtual (“App Relative”) Url.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Html.SimpleScriptManager().ScriptInclude(&lt;span class="str"&gt;&amp;quot;~/Scripts/jquery-1.3.2.js&amp;quot;&lt;/span&gt;); &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Html.SimpleScriptManager().ScriptInclude(&lt;span class="str"&gt;&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&amp;quot;&lt;/span&gt;); &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;You can also pass in a “Key” for the specific Script Include you’re registering. This key is a unique identifier used within your application for the specified Script Include, and it allows you to ensure that only a single include/reference to that specific script will get rendered within the Page.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Html.SimpleScriptManager().ScriptInclude(&lt;span class="str"&gt;&amp;quot;jquery&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;~/Scripts/jquery-1.3.2.js&amp;quot;&lt;/span&gt;); &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;For instance the second example of “ScriptInclude” above specifies the Key of “jquery”. You would be able to include this “ScriptInclude” call within any User Controls and/or Pages within your application that require that the “jquery-1.3.2.js” script be included within the page to work, and no matter how many of those controls are rendered to the page, the script would only have a single include/reference rendered to the Page.&lt;/p&gt;

&lt;p&gt;I know this isn’t a very good example of adding a script reference that may only be needed within a couple pages of an application, since you’ll most likely want jQuery included within every Page of your Application. To do this you’ll just add the “ScriptInclude” call to top of the Master Page file itself. However, I’m sure you get the idea I’m trying to reference on how to “optionally” include a script reference only when it’s needed, instead of including it within every single page of your application by adding it within the Master Page file.&lt;/p&gt;

&lt;h4&gt;“SimpleScriptManager.ScriptInclude” Method to Add Web Resource References&lt;/h4&gt;

&lt;p&gt;One of the things necessary when building Custom Server Controls (instead of just User Controls) is the fact that they reside within an Assembly and contain scripts as Embedded Web Resources. This can cause issues when adding Script Include references for these controls since you need to load the script from the Embedded Web Resource into the Page.&lt;/p&gt;

&lt;p&gt;However, this is really simple to do with an additional “ScriptInclude” method overload that uses generics to specify the Assembly to find the Embedded Web Resource within, plus the full resource name to include. There is also a method overload that accept a unique “Key” for the script just like the above “ScriptInclude” example.&lt;/p&gt;

&lt;p&gt;To use these overloads of the “ScriptInclude” method you must add a reference to the “SimpleScriptManager” namespace within your custom control. Also, your Custom Control/Component must inherit from the ViewUserControl class so that it gets access to the HtmlHelper object through the Html property.&lt;/p&gt;

&lt;p&gt;Here’s a really simple example of this:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// The SimpleScriptManager Namespace must be Imported to be able to use the Html.SimpleScriptManager Extension&lt;/span&gt;
&lt;span class="kwrd"&gt;using&lt;/span&gt; SimpleScriptManager;

&lt;span class="rem"&gt;// Specify that the &amp;quot;Embedded Resource&amp;quot; is to be a &amp;quot;Web Resource&amp;quot;&lt;/span&gt;
[assembly: System.Web.UI.WebResource(&lt;span class="str"&gt;&amp;quot;EmbeddedScriptResourceTest.TestScriptOne.js&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;)]

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; EmbeddedScriptResourceTest
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; TestScriptOneControl : System.Web.Mvc.ViewUserControl
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Message { get; set; }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RenderControl(System.Web.UI.HtmlTextWriter writer)
        {
            &lt;span class="kwrd"&gt;base&lt;/span&gt;.RenderControl(writer);

            &lt;span class="rem"&gt;// By specifying a Key when adding the ScriptInclude below, we are ensuring that the script only gets included&lt;/span&gt;
            &lt;span class="rem"&gt;// within the Page once, no matter how many instances of this control are renderd to the Page.&lt;/span&gt;
            &lt;span class="kwrd"&gt;this&lt;/span&gt;.Html.SimpleScriptManager().ScriptInclude&amp;lt;TestScriptOneControl&amp;gt;(&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;                 &lt;span class="str"&gt;&amp;quot;TestScriptOneKey&amp;quot;&lt;/span&gt;, &lt;/pre&gt;

&lt;pre class="csharpcode"&gt;                 &lt;span class="str"&gt;&amp;quot;EmbeddedScriptResourceTest.TestScriptOne.js&amp;quot;&lt;/span&gt;);
        }
    }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h4&gt;“SimpleScriptManager.Script” Method&lt;/h4&gt;

&lt;p&gt;To add a Script Block in to the Page you just call the “SimpleScriptManager.Script” method and pass it a String that contains the JavaScript code to include within the Page.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Html.SimpleScriptManager().Script(&lt;span class="str"&gt;&amp;quot;alert('Hello!');&amp;quot;&lt;/span&gt;); &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;You can also pass in a “Key” that uniquely identifies this specific Script Block. Just as with the “ScriptInclude” method, this allows you to specify that you only want this particular Script Block to be included within the Page only once no matter how many times any components within the Page specify it to be added.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Html.SimpleScriptManager().Script(&lt;span class="str"&gt;&amp;quot;ScriptKey&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;alert('Hello!');&amp;quot;&lt;/span&gt;); &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;h4&gt;“SimpleScriptManager.Script” Method using a Lambda Expression&lt;/h4&gt;

&lt;p&gt;I also included the ability to pass the “SimpleScriptManager.Script” method a Lambda Expression that will output the desired JavaScript code to the Page. This is something that makes it a little easier to add some Script to the Page and still be able to keep any code formatting in place (for readability) without requiring you to build it within a big, long String within the Page or User Control.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; Html.SimpleScriptManager().Script( () =&amp;gt; {&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
    $(function(){
        alert('Hello!');
    });&amp;quot;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;}); &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;This method also supports the ability to pass in a “Key” to specify you only want this script to be included within the Page a single time.&lt;/p&gt;

&lt;h3&gt;How “SimpleScriptManager” Works&lt;/h3&gt;

&lt;p&gt;Besides the “SimpleScriptManager” being included as an Extension Method to the HtmlHelper object; it also “attaches” itself to the HttpContext.Items Dictionary the first time “Html.SimpleScriptManager()” is called and then any subsequent calls just add any Script Includes or Blocks to that same SimpleScriptManager instance. Then when you call the “Render” method it writes out the entire Html code necessary to Render all the Script Includes and Blocks to the Page.&lt;/p&gt;

&lt;p&gt;This is actually a fairly simple design, and the code that “attaches” the SimpleScriptManager to the HttpContext is includes within the HtmlHelper Extension Method itself; the rest of the code is contained within the actual SimpleScriptManager object.&lt;/p&gt;

&lt;h3&gt;Full “SimpleScriptManager” Code&lt;/h3&gt;

&lt;p&gt;SimpleScriptManagerExtension.cs&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Copyright (c) 2009 Chris Pietschmann (http://pietschsoft.com)&lt;/span&gt;
&lt;span class="rem"&gt;// All rights reserved.&lt;/span&gt;
&lt;span class="rem"&gt;// Licensed under the Microsoft Public License (Ms-PL)&lt;/span&gt;
&lt;span class="rem"&gt;// http://opensource.org/licenses/ms-pl.html&lt;/span&gt;

&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Mvc;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SimpleScriptManager
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SimpleScriptManagerExtensions
    {
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; simpleScriptManagerKey = &lt;span class="str"&gt;&amp;quot;SimpleScriptManager&amp;quot;&lt;/span&gt;;

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; SimpleScriptManager SimpleScriptManager(&lt;span class="kwrd"&gt;this&lt;/span&gt; HtmlHelper helper)
        {
            &lt;span class="rem"&gt;// Get SimpleScriptManager from HttpContext.Items&lt;/span&gt;
            &lt;span class="rem"&gt;// This allows for a single SimpleScriptManager to be created and used per HTTP request.&lt;/span&gt;
            var scriptmanager = helper.ViewContext.HttpContext.Items[simpleScriptManagerKey] &lt;span class="kwrd"&gt;as&lt;/span&gt; SimpleScriptManager;
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (scriptmanager == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
            {
                &lt;span class="rem"&gt;// If SimpleScriptManager hasn't been initialized yet, then initialize it.&lt;/span&gt;
                scriptmanager = &lt;span class="kwrd"&gt;new&lt;/span&gt; SimpleScriptManager(helper);
                &lt;span class="rem"&gt;// Store it in HttpContext.Items for subsequent requests during this HTTP request.&lt;/span&gt;
                helper.ViewContext.HttpContext.Items[simpleScriptManagerKey] = scriptmanager;
            }
            &lt;span class="rem"&gt;// Return the SimpleScriptManager&lt;/span&gt;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; scriptmanager;
        }
    }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;SimpleScriptManager.cs&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Copyright (c) 2009 Chris Pietschmann (http://pietschsoft.com)&lt;/span&gt;
&lt;span class="rem"&gt;// All rights reserved.&lt;/span&gt;
&lt;span class="rem"&gt;// Licensed under the Microsoft Public License (Ms-PL)&lt;/span&gt;
&lt;span class="rem"&gt;// http://opensource.org/licenses/ms-pl.html&lt;/span&gt;

&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Reflection;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.Mvc;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; SimpleScriptManager
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SimpleScriptManager
    {
        &lt;span class="kwrd"&gt;private&lt;/span&gt; HtmlHelper htmlHelper;

        &lt;span class="kwrd"&gt;private&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, &lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt; scriptIncludes = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, &lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;();

        &lt;span class="kwrd"&gt;private&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, &lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt; scripts = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, &lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;();
        &lt;span class="kwrd"&gt;private&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, Action&amp;gt; scriptsActions = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;, Action&amp;gt;();

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// SimpleScriptManager Constructor&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;helper&amp;quot;&amp;gt;The HtmlHelper that this SimpleScriptManager will use to render to.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager(HtmlHelper helper)
        {
            &lt;span class="rem"&gt;// Store reference to the HtmlHelper object this SimpleScriptManager is tied to.&lt;/span&gt;
            &lt;span class="kwrd"&gt;this&lt;/span&gt;.htmlHelper = helper;
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Adds a script file reference to the page.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;scriptPath&amp;quot;&amp;gt;The URL of the script file.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;Returns the SimpleScriptManager&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager ScriptInclude(&lt;span class="kwrd"&gt;string&lt;/span&gt; scriptPath)
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.ScriptInclude(Guid.NewGuid().ToString(), scriptPath);
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Adds a script file reference to the page.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;key&amp;quot;&amp;gt;A unique identifier for the script file.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;scriptPath&amp;quot;&amp;gt;The URL of the script file.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;Returns the SimpleScriptManager&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager ScriptInclude(&lt;span class="kwrd"&gt;string&lt;/span&gt; key, &lt;span class="kwrd"&gt;string&lt;/span&gt; scriptPath)
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!&lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptIncludes.ContainsKey(key))
            {
                &lt;span class="rem"&gt;// Check if the scriptPath is a Virtual Path&lt;/span&gt;
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (scriptPath.StartsWith(&lt;span class="str"&gt;&amp;quot;~/&amp;quot;&lt;/span&gt;))
                {
                    &lt;span class="rem"&gt;// Convert the Virtual Path to an Application Absolute Path&lt;/span&gt;
                    scriptPath = VirtualPathUtility.ToAbsolute(scriptPath);
                }
                &lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptIncludes.Add(key, scriptPath);
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;;
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Adds a script file reference to the page for an Embedded Web Resource.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;The Type whos Assembly contains the Web Resource.&amp;lt;/typeparam&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;key&amp;quot;&amp;gt;A unique identifier for the script file.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;resourceName&amp;quot;&amp;gt;The name of the Web Resource.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;Returns the SimpleScriptManager&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager ScriptInclude&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; key, &lt;span class="kwrd"&gt;string&lt;/span&gt; resourceName)
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.ScriptInclude(key, getWebResourceUrl&amp;lt;T&amp;gt;(resourceName));
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Adds a script file reference to the page for an Embedded Web Resource.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;The Type whos Assembly contains the Web Resource.&amp;lt;/typeparam&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;resourceName&amp;quot;&amp;gt;The name of the Web Resource.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;Returns the SimpleScriptManager&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager ScriptInclude&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; resourceName)
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.ScriptInclude(getWebResourceUrl&amp;lt;T&amp;gt;(resourceName));
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Adds a script block to the page.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;javascript&amp;quot;&amp;gt;The JavaScript code to include in the Page.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;Returns the SimpleScriptManager&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager Script(&lt;span class="kwrd"&gt;string&lt;/span&gt; javascript)
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.Script(Guid.NewGuid().ToString(), javascript);
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Adds a script block to the page.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;key&amp;quot;&amp;gt;A unique identifier for the script.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;javascript&amp;quot;&amp;gt;The JavaScript code to include in the Page.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;Returns the SimpleScriptManager&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager Script(&lt;span class="kwrd"&gt;string&lt;/span&gt; key, &lt;span class="kwrd"&gt;string&lt;/span&gt; javascript)
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!&lt;span class="kwrd"&gt;this&lt;/span&gt;.scripts.ContainsKey(key) &amp;amp;&amp;amp; !&lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptsActions.ContainsKey(key))
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;.scripts.Add(key, javascript);
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;;
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Adds a script block to the page.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;javascript&amp;quot;&amp;gt;The JavaScript code to include in the Page.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;Returns the SimpleScriptManager&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager Script(Action javascript)
        {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.Script(Guid.NewGuid().ToString(), javascript);
        }
        
        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Adds a script block to the page.&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;key&amp;quot;&amp;gt;A unique identifier for the script.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;javascript&amp;quot;&amp;gt;The JavaScript code to include in the Page.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;Returns the SimpleScriptManager&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; SimpleScriptManager Script(&lt;span class="kwrd"&gt;string&lt;/span&gt; key, Action javascript)
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!&lt;span class="kwrd"&gt;this&lt;/span&gt;.scripts.ContainsKey(key) &amp;amp;&amp;amp; !&lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptsActions.ContainsKey(key))
            {
                &lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptsActions.Add(key, javascript);
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;;
        }

        &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;/// Renders the SimpleScriptManager to the Page&lt;/span&gt;
        &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Render()
        {
            var writer = &lt;span class="kwrd"&gt;this&lt;/span&gt;.htmlHelper.ViewContext.HttpContext.Response.Output;

            &lt;span class="rem"&gt;// Render All Script Includes to the Page&lt;/span&gt;
            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var scriptInclude &lt;span class="kwrd"&gt;in&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptIncludes)
            {
                writer.WriteLine(String.Format(&lt;span class="str"&gt;&amp;quot;&amp;lt;script type='text/javascript' src='{0}'&amp;gt;&amp;lt;/script&amp;gt;&amp;quot;&lt;/span&gt;, scriptInclude.Value));
            }
            
            &lt;span class="rem"&gt;// Render All other scripts to the Page&lt;/span&gt;
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;this&lt;/span&gt;.scripts.Count &amp;gt; 0 || &lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptsActions.Count &amp;gt; 0)
            {
                writer.WriteLine(&lt;span class="str"&gt;&amp;quot;&amp;lt;script type='text/javascript'&amp;gt;&amp;quot;&lt;/span&gt;);

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;this&lt;/span&gt;.scripts.Count &amp;gt; 0)
                {
                    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var script &lt;span class="kwrd"&gt;in&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.scripts)
                    {
                        writer.WriteLine(script.Value);
                    }
                }

                &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptsActions.Count &amp;gt; 0)
                {
                    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var script &lt;span class="kwrd"&gt;in&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.scriptsActions)
                    {
                        script.Value();
                    }
                }

                writer.WriteLine(&lt;span class="str"&gt;&amp;quot;&amp;lt;/script&amp;gt;&amp;quot;&lt;/span&gt;);
            }
        }


        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; MethodInfo _getWebResourceUrlMethod;
        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt; _getWebResourceUrlLock = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt;();

        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; getWebResourceUrl&amp;lt;T&amp;gt;(&lt;span class="kwrd"&gt;string&lt;/span&gt; resourceName)
        {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(resourceName))
            {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentNullException(&lt;span class="str"&gt;&amp;quot;resourceName&amp;quot;&lt;/span&gt;);
            }

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (_getWebResourceUrlMethod == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
            {
                &lt;span class="kwrd"&gt;lock&lt;/span&gt; (_getWebResourceUrlLock)
                {
                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (_getWebResourceUrlMethod == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
                    {
                        _getWebResourceUrlMethod = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(System.Web.Handlers.AssemblyResourceLoader).GetMethod(
                            &lt;span class="str"&gt;&amp;quot;GetWebResourceUrlInternal&amp;quot;&lt;/span&gt;,
                            BindingFlags.NonPublic | BindingFlags.Static);
                    }
                }
            }

            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;/&amp;quot;&lt;/span&gt; + (&lt;span class="kwrd"&gt;string&lt;/span&gt;)_getWebResourceUrlMethod.Invoke(&lt;span class="kwrd"&gt;null&lt;/span&gt;,
                &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;object&lt;/span&gt;[] { Assembly.GetAssembly(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(T)), resourceName, &lt;span class="kwrd"&gt;false&lt;/span&gt; });
        }

    }
}&lt;/pre&gt;

&lt;h3&gt;&amp;#160;&lt;/h3&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;At first it seemed that the easiest way to get similar functionality to this was to use the ASP.NET AJAX ScriptManager control; however that control requires that it be embedded within a &lt;em&gt;&amp;lt;form runat=”server”&amp;gt;&amp;lt;/form&amp;gt;&lt;/em&gt; tag, and that just doesn’t really work with ASP.NET MVC. Actually the methods to get the ASP.NET AJAX ScriptManager to work with ASP.NET MVC are just plain “Hacks” and they made me feel like I wasn’t being True to the new ASP.NET MVC Platform.&lt;/p&gt;

&lt;p&gt;In the end, I’m very happy that I was able to work out an extremely simple solution to this problem that will definitely help when building out ASP.NET MVC Web Applications.&lt;/p&gt;

&lt;p&gt;If you have any feedback on this, please leave a comment.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rb1qCWWo8i7E0viHUvljB-8ktf0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rb1qCWWo8i7E0viHUvljB-8ktf0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rb1qCWWo8i7E0viHUvljB-8ktf0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rb1qCWWo8i7E0viHUvljB-8ktf0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=-Ni-autJQ44:S4xyabE8mwM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=-Ni-autJQ44:S4xyabE8mwM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=-Ni-autJQ44:S4xyabE8mwM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=-Ni-autJQ44:S4xyabE8mwM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=-Ni-autJQ44:S4xyabE8mwM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/-Ni-autJQ44" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/08/13/Simple-ScriptManager-for-ASPNET-MVC.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/08/13/Simple-ScriptManager-for-ASPNET-MVC.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=fccc2f93-f7a3-481d-bcd7-a3b9425420bd</guid>
      <pubDate>Thu, 13 Aug 2009 16:23:18 -0600</pubDate>
      <category>JavaScript</category>
      <category>ASP.NET MVC</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=fccc2f93-f7a3-481d-bcd7-a3b9425420bd</pingback:target>
      <slash:comments>9</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=fccc2f93-f7a3-481d-bcd7-a3b9425420bd</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/08/13/Simple-ScriptManager-for-ASPNET-MVC.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=fccc2f93-f7a3-481d-bcd7-a3b9425420bd</wfw:commentRss>
    </item>
    <item>
      <title>Windows 7 RTM is on MSDN &amp; TechNet – Here’s the AKAMAI links!</title>
      <description>&lt;p&gt;I first started downloading Windows 7 Ultimate off MSDN using the old File Transfer Manager and it was taking FOREVER to download. The download started out good, then it dropped off to about 40KB/sec and said it would take about 14 hours to finish! Man, I was hoping I’d be able to get it downloaded quick so I can start updating my machines today/tonight.&lt;/p&gt;  &lt;p&gt;Then I saw a Twitter post by &lt;a href="http://twitter.com/Rickster_CDN" target="_blank"&gt;@Rickster_CDN&lt;/a&gt; mentioning a link to a page with the AKAMAI links for TechNet to download Windows 7 WAY FASTER! Actually the link is to the “Top Downloads” page on TechNet.&lt;/p&gt;  &lt;p&gt;It turns out that MSDN has the same kind of “Top Downloads” page, so&amp;#160; you can really use AKAMAI to download Windows 7 much FASTER whether you have an MSDN or TechNet Subscription.&lt;/p&gt;  &lt;p&gt;Here’s the Links:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://technet.microsoft.com/en-us/subscriptions/securedownloads/dd692862.aspx" target="_blank"&gt;TechNet Top Downloads with AKAMAI Links&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://msdn.microsoft.com/en-us/subscriptions/securedownloads/bb608344.aspx" target="_blank"&gt;MSDN Top Downloads with AKAMAI Links&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’m currently downloading Windows 7 Ultimate RTM at about 1.3MB/sec and I have about 28 minutes left. It sure beat the crap out of the File Transfer Manager downloading at about 40KB/sec.&lt;/p&gt;  &lt;p&gt;Happy Downloading!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ra9Rm8HUVFqPe9Pyl3MaZhX46gk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ra9Rm8HUVFqPe9Pyl3MaZhX46gk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ra9Rm8HUVFqPe9Pyl3MaZhX46gk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ra9Rm8HUVFqPe9Pyl3MaZhX46gk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=5_RoNTpPFQw:DZVX2b_piZs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=5_RoNTpPFQw:DZVX2b_piZs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=5_RoNTpPFQw:DZVX2b_piZs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=5_RoNTpPFQw:DZVX2b_piZs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=5_RoNTpPFQw:DZVX2b_piZs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/5_RoNTpPFQw" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/08/06/Windows-7-RTM-is-on-MSDN-TechNet-e28093-Heree28099s-the-AKAMAI-links!.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/08/06/Windows-7-RTM-is-on-MSDN-TechNet-e28093-Heree28099s-the-AKAMAI-links!.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=0a4dba86-eec6-465b-9398-ec0c6f020e05</guid>
      <pubDate>Thu, 06 Aug 2009 15:32:00 -0600</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=0a4dba86-eec6-465b-9398-ec0c6f020e05</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=0a4dba86-eec6-465b-9398-ec0c6f020e05</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/08/06/Windows-7-RTM-is-on-MSDN-TechNet-e28093-Heree28099s-the-AKAMAI-links!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=0a4dba86-eec6-465b-9398-ec0c6f020e05</wfw:commentRss>
    </item>
    <item>
      <title>Bing Maps Silverlight CTP: Plot/Edit Pushpin data via a ChildWindow</title>
      <description>&lt;p&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=Silverlight_BingMaps_CTP_EditPushpintsWithChildWindow.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="Silverlight_BingMaps_CTP_EditPushpintsWithChildWindow" border="0" alt="Silverlight_BingMaps_CTP_EditPushpintsWithChildWindow" align="right" src="http://pietschsoft.com/image.axd?picture=Silverlight_BingMaps_CTP_EditPushpintsWithChildWindow.png" width="244" height="178" /&gt;&lt;/a&gt; Recently I posted an example of using the &lt;a href="http://blog.simplovation.com/blog/post.aspx?id=2360a9ab-48e5-410f-a2b4-195fa501f1ea" target="_blank"&gt;Web.Maps.VE Bing Maps ASP.NET AJAX Server Control with the AjaxControlToolkit ModalPopup Extender over at the Simplovation Blog&lt;/a&gt;. Writing that example was rather simple since those two components/libraries are both written on top of ASP.NET AJAX and work extremely well together. This did however get me thinking about how to implement this same type of functionality using the Bing Maps Silveright Control CTP, and now that Silverlight 3 is out and it has a ChildWIndow control, this is actually really simple to implement using Silverlight as well.&lt;/p&gt;  &lt;p&gt;This was written for the Bing Maps Silverlight CTP Release.&lt;/p&gt;  &lt;p&gt;Download Example Code: &lt;a href="http://pietschsoft.com/file.axd?file=2009%2f8%2fSilverlight_BingMaps_CTP_EditPushpinsWithChildWindow.zip"&gt;Silverlight_BingMaps_CTP_EditPushpinsWithChildWindow.zip (235.44 kb)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To the right you can see a screenshot of this code sample in action. The screenshot in the back is just displaying the plotted “pushpins” as red squares, with tooltip being displayed over the pushpin located in Seattle, WA. The front screenshot is displaying the “Edit” dialog using the ChildWindow control.&lt;/p&gt;  &lt;p&gt;Before you hit Run (F5) on this Example Code, you will need to have the &lt;a href="http://connect.microsoft.com/silverlightmapcontrolctp" target="_blank"&gt;Bing Maps Silverlight Map Control SDK CTP&lt;/a&gt; Installed.&lt;/p&gt;  &lt;p&gt;If you want to see how to use the Silverlight 3 ChildWindow control, I recommend you take a look at &lt;a href="http://www.wintellect.com/CS/blogs/jprosise/archive/2009/04/29/silverlight-3-s-new-child-windows.aspx" target="_blank"&gt;Jeff Prosise’s “Silverlight 3’s New Child Windows”&lt;/a&gt; post.&lt;/p&gt;  &lt;p&gt;Also, if you want to see how to work with the Bing Maps Silverlight Control CTP, then you may want to take a look at the following links:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=20736f64-9876-4d0f-b60e-3fe20252d4c4" target="_blank"&gt;Getting Started with Bing Maps Silverlight Map Control SDK CTP&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=9f492f0f-8da4-4606-9f43-098074d8b9e9" target="_blank"&gt;Bing Maps Silverlight: Using MouseClick Event to Add “Pushpins”&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=6a098f41-2df4-4362-a577-606863de838c" target="_blank"&gt;Bing Maps Silverlight: Basics of Adding Polygons and Polylines using XAML and Code&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=2c25c9bc-e290-41e4-9a03-daa75a912c63" target="_blank"&gt;Bing Maps Silverlight: Adding Media (Images, Video, etc.) to the Map&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=ce8b5456-ef99-4311-8099-16976ebcc5e2" target="_blank"&gt;Bing Maps Silverlight: Using Tile Layers to Overlay Custom Map Imagery&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=88a585cd-f90a-40e1-963d-ca1932ce2535" target="_blank"&gt;Bing Maps Silverlight: Overlay OpentStreetMap, OpenAerialMap and Yahoo Map Imagery using Custom Tile Layers&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fKzEAk-l_iuCwxfL0lb2AVZ0Tmk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fKzEAk-l_iuCwxfL0lb2AVZ0Tmk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fKzEAk-l_iuCwxfL0lb2AVZ0Tmk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fKzEAk-l_iuCwxfL0lb2AVZ0Tmk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=7tC6InWWXh0:4xp_g5l3WV0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=7tC6InWWXh0:4xp_g5l3WV0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=7tC6InWWXh0:4xp_g5l3WV0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=7tC6InWWXh0:4xp_g5l3WV0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=7tC6InWWXh0:4xp_g5l3WV0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/7tC6InWWXh0" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/08/04/Bing-Maps-Silverlight-Plot-Edit-Pushpin-data-via-a-ChildWindow.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/08/04/Bing-Maps-Silverlight-Plot-Edit-Pushpin-data-via-a-ChildWindow.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=85a6ee8c-71b5-4c7e-8aec-2adeb2b97919</guid>
      <pubDate>Tue, 04 Aug 2009 16:57:00 -0600</pubDate>
      <category>Bing Maps</category>
      <category>Silverlight</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=85a6ee8c-71b5-4c7e-8aec-2adeb2b97919</pingback:target>
      <slash:comments>6</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=85a6ee8c-71b5-4c7e-8aec-2adeb2b97919</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/08/04/Bing-Maps-Silverlight-Plot-Edit-Pushpin-data-via-a-ChildWindow.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=85a6ee8c-71b5-4c7e-8aec-2adeb2b97919</wfw:commentRss>
    </item>
    <item>
      <title>OpenStreetMap: Get FREE Web Mapping with Road Maps for your Applications</title>
      <description>&lt;p&gt;&lt;a href="http://www.openstreetmap.org/" target="_blank"&gt;&lt;a href="http://pietschsoft.com/image.axd?picture=OpenStreetMapScreenshot.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="OpenStreetMapScreenshot" border="0" alt="OpenStreetMapScreenshot" align="right" src="http://pietschsoft.com/image.axd?picture=OpenStreetMapScreenshot_thumb.png" width="244" height="182" /&gt;&lt;/a&gt;OpenStreetMap&lt;/a&gt; has been around for awhile and provides free geographic data that can be used by anyone. The data is all community created/contributed and that’s why it’s free to use. Other mapping services such as Bing Maps for Enterprise and Google Maps license their geographic data from some other third party and that’s why they cost thousands of dollars per year to use within commercial applications.&lt;/p&gt;  &lt;h3&gt;Using OpenStreetMap with JavaScript&lt;/h3&gt;  &lt;p&gt;The screenshot on the left is showing an example of embedding OpenStreetMap imagery within a web page using &lt;a href="http://www.openlayers.org/" target="_blank"&gt;OpenLayers&lt;/a&gt;. OpenLayers is an open-source, JavaScript-based Map control similar to the Bing Maps for Enterprise JavaScript Control and the Google Maps API; except it’s free to use and offers some decent mapping when combined with OpenStreetMap.&lt;/p&gt;  &lt;p&gt;You can find examples of using OpenStreetMap with OpenLayers here: &lt;a title="http://wiki.openstreetmap.org/wiki/OpenLayers" href="http://wiki.openstreetmap.org/wiki/OpenLayers"&gt;http://wiki.openstreetmap.org/wiki/OpenLayers&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Using OpenStreetMap with Silverlight&lt;/h3&gt;  &lt;p&gt;Unfortunately, there aren’t any open-source Silverlight controls like OpenLayers, but you can easily use OpenStreetMap imagery with the Bing Maps for Enterprise Silverlight Control. Here’s an example of how to do this using the current Bing Maps for Enterprise Silverlight Control Beta release:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pietschsoft.com/post.aspx?id=88a585cd-f90a-40e1-963d-ca1932ce2535" target="_blank"&gt;Virtual Earth Silverlight: Overlay OpenStreetMap, OpenAerialMap and Yahoo Map Imagery using Custom Tile Layers!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pSxhxMGtnqh-V76QboEid7iskBA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pSxhxMGtnqh-V76QboEid7iskBA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pSxhxMGtnqh-V76QboEid7iskBA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pSxhxMGtnqh-V76QboEid7iskBA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WtzT_bGhXgs:YAIrN2GAH78:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WtzT_bGhXgs:YAIrN2GAH78:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=WtzT_bGhXgs:YAIrN2GAH78:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WtzT_bGhXgs:YAIrN2GAH78:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=WtzT_bGhXgs:YAIrN2GAH78:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/WtzT_bGhXgs" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/08/03/OpenStreetMap-Get-FREE-Web-Mapping-with-Road-Maps-for-your-Applications.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/08/03/OpenStreetMap-Get-FREE-Web-Mapping-with-Road-Maps-for-your-Applications.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=0b30a5c1-d379-42d8-ba81-4552045f48e1</guid>
      <pubDate>Mon, 03 Aug 2009 21:29:00 -0600</pubDate>
      <category>Silverlight</category>
      <category>JavaScript</category>
      <category>Bing Maps</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=0b30a5c1-d379-42d8-ba81-4552045f48e1</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=0b30a5c1-d379-42d8-ba81-4552045f48e1</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/08/03/OpenStreetMap-Get-FREE-Web-Mapping-with-Road-Maps-for-your-Applications.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=0b30a5c1-d379-42d8-ba81-4552045f48e1</wfw:commentRss>
    </item>
    <item>
      <title>JavaScript: Easily "Extend" an Object/Element</title>
      <description>&lt;p&gt;If you use jQuery then you may be familiar with its "&lt;a href="http://docs.jquery.com/Utilities/jQuery.extend"&gt;jQuery.extend&lt;/a&gt;" method. The "jQuery.extend" method allows you to easily extend one object with one or more others. This is something that can really come in handy, especially when dealing with passing in "options" to a method, and needing to have them "default" to certain values.&lt;/p&gt;
&lt;p&gt;For Example:&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span class="rem"&gt;// "Default" to showing both Toolbar and Footer&lt;br /&gt;var defaultOptions = { showToolbar: true, showFooter: true };&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; MyObject = &lt;span class="kwrd"&gt;function&lt;/span&gt;(options){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Create a new "opts" variable that is a copy of "defaultOptions", then apply all values from "options"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var opts = jQuery.extend({}, defaultOptions, options);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Now you have the "opts" variable that has all the "defaultOptions" values merged with the&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // "options" that were passed in to the function.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Do Stuff According to "opts" defined&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;}&lt;br /&gt;MyObject.prototype = {};&lt;/p&gt;
&lt;p&gt;&lt;span class="rem"&gt;// Example of creating new MyObject and passing it only the values you want to override the defaults&lt;br /&gt;var obj = new MyObject({ showFooter: false });&lt;br /&gt;// The above line will tell the new "MyObject" to show the toolbar, but not the footer.&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h3&gt;Why use this?&lt;/h3&gt;
&lt;p&gt;As you can probably tell from the above example of doing this with jQuery, this really helps to simplify and reduce the amount of code you write. The benefits are smaller .js files for the browser to download, and it's just easier to read/maintain the code.&lt;/p&gt;
&lt;p&gt;If you still have questions about this, then the following non-jQuery example of doing the same thing should help clear things up for you.&lt;/p&gt;
&lt;h3&gt;What if I'm Not using jQuery?&lt;br /&gt;&lt;/h3&gt;
&lt;p&gt;As you can probably see, the above example can really help to keep things simple. However, if you're not using jQuery how would you do this?&lt;/p&gt;
&lt;p&gt;Now the "jQuery.extend" method has some logic to make sure the resulting object is only a copy and doesn't contain any references to the original so you don't mess things up, but below is really simplified version that will get the job done in most cases.&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span class="rem"&gt;// Create Global "extend" method&lt;br /&gt;var extend = function(obj, extObj) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (arguments.length &amp;gt; 2) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var a = 1; a &amp;lt; arguments.length; a++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extend(obj, arguments[a]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i in extObj) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj[i] = extObj[i];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return obj;&lt;br /&gt;};&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Here's some examples of using the above "extend" method:&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; Person = &lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;};&lt;br /&gt;Person.prototype = {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstName: &lt;span class="kwrd"&gt;null&lt;/span&gt;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LastName: &lt;span class="kwrd"&gt;null&lt;/span&gt;&lt;br /&gt;};&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; person1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; Person();&lt;br /&gt;&lt;span class="rem"&gt;// Set multiple object properties with a single line of code&lt;br /&gt;extend(person1, { FirstName: "John", LastName: "Doe" });&lt;br /&gt;alert(person1.FirstName + " " + person1.LastName);&lt;br /&gt;&lt;br /&gt;// Create a new Person instance and set it's properties in 1 line&lt;br /&gt;var person2 = extend(new Person(), { FirstName: "John", LastName: "Doe" });&lt;br /&gt;alert(person2.FirstName);&lt;br /&gt;&lt;br /&gt;// "clone" person2&lt;br /&gt;var person3 = extend(new Person(), person2);&lt;br /&gt;alert(person3.LastName);&lt;br /&gt;&lt;br /&gt;// "clone" person2 and add new properties&lt;br /&gt;var person4 = extend(new Person(), person2, { Age: 18 });&lt;br /&gt;alert(person4.FirstName + " :: " + person4.Age);&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This can also be used to more easily add new HTML Elements to a page:&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;br /&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; js = extend(document.createElement(&lt;span class="str"&gt;"script"&lt;/span&gt;), { type: &lt;span class="str"&gt;"text/javascript"&lt;/span&gt;, src: &lt;span class="str"&gt;"test.js"&lt;/span&gt; });&lt;br /&gt;document.body.appendChild(js);&lt;/p&gt;
&lt;p&gt;&lt;span class="rem"&gt;//As you can see the above is simpler than the traditional method of creating a new &amp;lt;script&amp;gt; Element&lt;br /&gt;var js = document.createElement("script");&lt;br /&gt;js.type = "text/javascript";&lt;br /&gt;js.src = "test.js";&lt;br /&gt;document.body.appendChild(js);&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Now the use of the above method is actually really simple, and the end result is pretty much identical to the "jQuery.extend" method for simple tasks. If you want to have a cleaner "cloning" of the object values that get merged, then you'll probably want to use the "jQuery.extend" method or just copy it into your project if you aren't using jQuery.&lt;/p&gt;
&lt;p&gt;Enjoy.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DVvB3oM6gj7FtsnGEaFWWpWX6A0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DVvB3oM6gj7FtsnGEaFWWpWX6A0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DVvB3oM6gj7FtsnGEaFWWpWX6A0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DVvB3oM6gj7FtsnGEaFWWpWX6A0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=_jBtsBd6YrM:9unk36cNe5U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=_jBtsBd6YrM:9unk36cNe5U:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=_jBtsBd6YrM:9unk36cNe5U:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=_jBtsBd6YrM:9unk36cNe5U:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=_jBtsBd6YrM:9unk36cNe5U:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/_jBtsBd6YrM" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/07/29/JavaScript-Easily-Extend-an-Object-Element.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/07/29/JavaScript-Easily-Extend-an-Object-Element.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=a2d820aa-2a18-491e-8552-cf6f30ff4913</guid>
      <pubDate>Wed, 29 Jul 2009 17:03:00 -0600</pubDate>
      <category>JavaScript</category>
      <category>jquery</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=a2d820aa-2a18-491e-8552-cf6f30ff4913</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=a2d820aa-2a18-491e-8552-cf6f30ff4913</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/07/29/JavaScript-Easily-Extend-an-Object-Element.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=a2d820aa-2a18-491e-8552-cf6f30ff4913</wfw:commentRss>
    </item>
    <item>
      <title>jHtmlArea 0.6.0 Update with Improved Functionality</title>
      <description>&lt;p&gt;&lt;img src="http://pietschsoft.com/image.axd?picture=2009%2f7%2fjHtmlArea_0.6.0_Screenshot.png" alt="" align="right" /&gt;&lt;/p&gt;
&lt;p&gt;I just posted a pretty good update the the jHtmlArea project that includes quite a few more toolbar buttons and a new Color Picker Menu extension/plugin (jHtmlAreaColorPickerMenu) that adds a nice, simple color picker when using the "forecolor" toolbar button.&lt;/p&gt;
&lt;p&gt;&lt;span id="ctl00_ctl00_MasterContent_Content_wikiSourceLabel"&gt;jHtmlArea is a simple, light weight, extensible WYSIWYG HTML Editor built on top of jQuery. This component allows you to easily display a WYSIWYG HTML Editor in place of any TextArea DOM Elements on the page. The minified script alone is 8.7kb, and with css and image files it's a total of 22k.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Download: &lt;a href="http://jhtmlarea.codeplex.com"&gt;jHtmlArea Project Home&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To the right is an updated screenshot of the latest release, plus below is a full change log for this update release:&lt;/p&gt;
&lt;p&gt;- Hide All Toolbar buttons except the "html" button when entering&lt;br /&gt;HTML Source view (via clicking "html" button or executing&lt;br /&gt;jHtmlArea.showHTMLView). When toggling view back to the WYSIWYG editor&lt;br /&gt;all other buttons will then be shown again.&lt;br /&gt;&lt;br /&gt;- Added jHtmlArea.dispose method - Allows you to remove the WYSIWYG&lt;/p&gt;
&lt;p&gt;editor, and go back to having a plain TextArea. Beware, there is a&lt;br /&gt;memory leak when using this method; it's not too bad, but you want&lt;br /&gt;to call this as few a number of times if you can. The memory leak&lt;br /&gt;is due to the way the browsers handle removing DOM Elements.&lt;br /&gt;&lt;br /&gt;- Added Indent and Outdent functionality - This includes toolbar buttons&lt;br /&gt;and jHtmlArea.indent and jHtmlArea.outdent buttons.&lt;br /&gt;&lt;br /&gt;- Added justifyLeft, justifyCenter, justifyRight functionality and toolbar&lt;br /&gt;buttons.&lt;br /&gt;&lt;br /&gt;- Added insertHorizontalRule functionality and toolbar button. This adds a&lt;br /&gt;&amp;lt;hr&amp;gt; tag to the currently selected area.&lt;br /&gt;&lt;br /&gt;- Added an "alias" method for jHtmlArea.execCommand named "ec" to help reduce the&lt;br /&gt;file size of the script.&lt;br /&gt;&lt;br /&gt;- Added increaseFontSize and decreaseFontSize functionality and toolbar buttons.&lt;br /&gt;The increaseFontSize and decreaseFontSize doesn't currently work in Safari.&lt;br /&gt;&lt;br /&gt;- Added forecolor functionality - Changes a font color for the selection or at the&lt;br /&gt;insertion point. Requires a color value string to be passed in as a value argument.&lt;br /&gt;&lt;br /&gt;- Fixed bug in jHtmlArea.toString method&lt;br /&gt;&lt;br /&gt;- Added jHtmlArea.queryCommandValue method and it's alias "jHtmlArea.qc"&lt;/p&gt;
&lt;p&gt;- Added the jHtmlAreaColorPickerMenu plugin/extension that resides within the&lt;br /&gt;"jHtmlAreaColorPickerMenu.js" file. This file includes a somewhat generic color&lt;br /&gt;picker menu that can be used for any purpose, plus it includes the code to wire&lt;br /&gt;up and override the "stock" jHtmlColor.forecolor functionality and inject the new&lt;br /&gt;Color Picker Menu functionality in it's place when you click on the "forecolor"&lt;br /&gt;toolbar button.&lt;br /&gt;&lt;br /&gt;- Changed the "execCommand" and "ec" second parameter to default to "false" if not&lt;br /&gt;specified, and third parameter to default to "null" if not specified. This helps to&lt;br /&gt;reduce the overall file size of the script.&lt;br /&gt;&lt;br /&gt;- Added support for Toolbar Button Grouping, now with the additional buttons included&lt;br /&gt;in this release, or even when any custom buttons are used, they will be able to display&lt;br /&gt;nicely by "auto-wrapping" to the next line.&lt;br /&gt;&lt;br /&gt;- Added a gradient background to the Toolbar Button Groups, with a slight reverse&lt;br /&gt;gradient on the Buttons when the mouse is hovered over.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QSpY2ybIZ67LUcBPg6hMCkHx8fw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QSpY2ybIZ67LUcBPg6hMCkHx8fw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QSpY2ybIZ67LUcBPg6hMCkHx8fw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QSpY2ybIZ67LUcBPg6hMCkHx8fw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=QpgDrCjjFPA:SxIqia8fvZc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=QpgDrCjjFPA:SxIqia8fvZc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=QpgDrCjjFPA:SxIqia8fvZc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=QpgDrCjjFPA:SxIqia8fvZc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=QpgDrCjjFPA:SxIqia8fvZc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/QpgDrCjjFPA" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/07/24/jHtmlArea_060_Update_with_Improved_Functionality.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/07/24/jHtmlArea_060_Update_with_Improved_Functionality.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=9901a400-8fdb-4811-a030-6827de25695a</guid>
      <pubDate>Fri, 24 Jul 2009 16:44:00 -0600</pubDate>
      <category>JavaScript</category>
      <category>jquery</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=9901a400-8fdb-4811-a030-6827de25695a</pingback:target>
      <slash:comments>8</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=9901a400-8fdb-4811-a030-6827de25695a</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/07/24/jHtmlArea_060_Update_with_Improved_Functionality.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=9901a400-8fdb-4811-a030-6827de25695a</wfw:commentRss>
    </item>
    <item>
      <title>jHtmlArea - The all NEW HTML WYSIWYG Editor for jQuery</title>
      <description>&lt;p&gt;The last couple days I spent time working on a new simple, lightweight, extensible HTML WYSIWYG editor that's built on top of jQuery. I know there are a ton of existing editors, but &lt;a href="http://stackoverflow.com/questions/1141073/whats-the-best-wysiwyg-editor-for-use-with-jquery"&gt;I couldn't seem to find any with a truely simple, lightweight design that allowed for really easy extensibility&lt;/a&gt;, and that's built on top of jQuery to take advantage of the cross-platform capabilities that jQuery has to offer. I feel that I've come up with a really nice HTML editor component that has some pretty usefull extensibility points. Allow me to introduce you to &lt;a href="http://jhtmlarea.codeplex.com"&gt;jHTMLArea&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can download jHtmlArea and some examples of using it over at the official project page on CodePlex: &lt;a href="http://jhtmlarea.codeplex.com"&gt;http://jhtmlarea.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://pietschsoft.com/image.axd?picture=2009%2f7%2fScreenshot.png" alt="" align="right" /&gt;&lt;/p&gt;
&lt;p&gt;To the right there's a screenshot of two instances of jHtmlArea in action. The first one is using the "default" configuration, and the second uses a couple of different custom options, including a completely custom "Save" button that's added using one of jHtmlArea's extensibility points.&lt;/p&gt;
&lt;h3&gt;Using jHtmlArea is As Simple As 1.2.3.&lt;/h3&gt;
&lt;p&gt;Follow these 3 steps and you'll have jHtmlArea implemented within your application in no time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. &lt;/strong&gt;Add a &amp;lt;TextArea&amp;gt; to your HTML page&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. &lt;/strong&gt;Add the "jHtmlArea.js", "jHtmlArea.css" and "jHtmlArea.png" files to your website&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; Add the following JavaScript code to your page to turn all TextArea elements into jHtmlArea's:&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;$(&lt;span class="kwrd"&gt;function&lt;/span&gt;(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span class="str"&gt;"textarea"&lt;/span&gt;).htmlarea();&lt;br /&gt;});&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;It can be as simple as that to use jHtmlArea within your pages to turn any TextArea DOM Elements into nice jHtmlArea WYSIWYG Editors.&lt;/p&gt;
&lt;h3&gt;Easily Configure Toolbar Buttons&lt;/h3&gt;
&lt;p&gt;jHtmlArea makes it extremely simple to define your own custom set of Toolbar buttons; just in case you don't want to show the full set of "default" buttons.&lt;/p&gt;
&lt;p&gt;You can easily specify them by name within an array that's passed in as one of the options specified when you call the "htmlarea" method:&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;$(&lt;span class="str"&gt;"#txtCustomHtmlArea"&lt;/span&gt;).htmlarea({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; toolbar: [&lt;span class="str"&gt;"bold"&lt;/span&gt;, &lt;span class="str"&gt;"italic"&lt;/span&gt;, &lt;span class="str"&gt;"underline"&lt;/span&gt;, &lt;span class="str"&gt;"|"&lt;/span&gt;, &lt;span class="str"&gt;"h1"&lt;/span&gt;, &lt;span class="str"&gt;"h2"&lt;/span&gt;, &lt;span class="str"&gt;"h3"&lt;/span&gt;, &lt;span class="str"&gt;"h4"&lt;/span&gt;, &lt;span class="str"&gt;"h5"&lt;/span&gt;, &lt;span class="str"&gt;"h6"&lt;/span&gt;, &lt;span class="str"&gt;"|"&lt;/span&gt;, &lt;span class="str"&gt;"link"&lt;/span&gt;, &lt;span class="str"&gt;"unlink"&lt;/span&gt;]&lt;br /&gt;});&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This example will specify the same buttons displayed in the lower screenshot to the right; minus the "Save" button on the far right of the toolbar. I'll show you how to add this button in the next example.&lt;/p&gt;
&lt;h3&gt;Add Custom Toolbar Buttons&lt;/h3&gt;
&lt;p&gt;One of the extensibility points that I was wanting to have in an HTML WYSIWYG editor is the ability to easily add any custom buttons to the toolbar. For instance, some times it may be nice to have a "Save" button in the toolbar to allow your users to easily save the contents of the editor.&lt;/p&gt;
&lt;p&gt;Here's an example using the above "custom" toolbar buttons list, with a custom "Save" button added:&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;$(&lt;span class="str"&gt;"#txtCustomHtmlArea"&lt;/span&gt;).htmlarea({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; toolbar: [&lt;span class="str"&gt;"bold"&lt;/span&gt;, &lt;span class="str"&gt;"italic"&lt;/span&gt;, &lt;span class="str"&gt;"underline"&lt;/span&gt;, &lt;span class="str"&gt;"|"&lt;/span&gt;, &lt;span class="str"&gt;"h1"&lt;/span&gt;, &lt;span class="str"&gt;"h2"&lt;/span&gt;, &lt;span class="str"&gt;"h3"&lt;/span&gt;, &lt;span class="str"&gt;"h4"&lt;/span&gt;, &lt;span class="str"&gt;"h5"&lt;/span&gt;, &lt;span class="str"&gt;"h6"&lt;/span&gt;, &lt;span class="str"&gt;"|"&lt;/span&gt;, &lt;span class="str"&gt;"link"&lt;/span&gt;, &lt;span class="str"&gt;"unlink"&lt;/span&gt;, &lt;span class="str"&gt;"|"&lt;/span&gt;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// This is how to add a completely custom Toolbar Button&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // The CSS Class to assign the Button &amp;lt;a&amp;gt; tag&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; css: "custom_disk_button",&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // The Text to display in the buttons alt text / tooltip&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text: "Save",&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // The function to execute when the button is clicked&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; action: function(btn) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 'this' = jHtmlArea object&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 'btn' = jQuery object that represents the &amp;lt;A&amp;gt; "anchor" tag for the Toolbar Button&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert('SAVE!\n\n' + this.toHtmlString());&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add any Ajax Code here to save the contents of the editor&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;br /&gt;});&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Once the JavaScript code is entered to add the custom "Save" button, we then need to add the buttons display image to the website, and then include the necessary CSS to allow it to be displayed:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;What about Localization?&lt;/h3&gt;
&lt;p&gt;Well, the jHtmlEditor currently only comes with English text for all the button names / tooltips. However, it is extremely simple to specify your own text to use when calling the "htmlarea" to create jHtmlArea editors within the page. You set the Text to be displayed for each button by referencing it by "name". This is the same "name" that is used in the first example to specify which buttons are displayed in the toolbar.&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;$(&lt;span class="str"&gt;"#txtCustomHtmlArea"&lt;/span&gt;).htmlarea({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Override any of the toolbarText values - these are the Alt Text / Tooltips shown&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // when the user hovers the mouse over the Toolbar Buttons&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Here are a couple translated to German, thanks to Google Translate.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; toolbarText: $.extend({}, jHtmlArea.defaultOptions.toolbarText, {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "bold": "fett",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "italic": "kursiv",&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "underline": "unterstreichen"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; })&lt;br /&gt;});&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h3&gt;Specify CSS File to be used by the Editor&lt;/h3&gt;
&lt;p&gt;You can also specify a specify CSS file to be used within the Editor itself.&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;$(&lt;span class="str"&gt;"#txtCustomHtmlArea"&lt;/span&gt;).htmlarea({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; css: &lt;span class="str"&gt;"style//jHtmlArea.Editor.css"&lt;/span&gt;&lt;br /&gt;});&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h3&gt;Specify a Callback when the Editor Finishes Loading&lt;/h3&gt;
&lt;p&gt;It may be nice in some instances to get notified when the editor has finsihed loading in the page so you can perform some kind of action. This is also really simple to do.&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;$(&lt;span class="str"&gt;"#txtCustomHtmlArea"&lt;/span&gt;).htmlarea({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="rem"&gt;// Do something once the editor has finished loading&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; loaded: function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //// 'this' is equal to the jHtmlArea object&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("jHtmlArea has loaded!");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this.showHTMLView(); // show the HTML view once the editor has finished loading&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt; });&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;h3&gt;Call any jHtmlArea object methods easily from jQuery&lt;/h3&gt;
&lt;p&gt;Another thing is that the jQuery object doesn't directly expose the different jHtmlArea object's methods. However, you can use the "htmlarea" method to call any of them you need to. All you need to do is specify the method by name that you want to call and pass any additional parameters to the "htmlarea" method and it'll return the results.&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span class="rem"&gt;// Get the HTML string value from within the editor&lt;br /&gt;var html = $("#txtCustomHtmlArea").htmlarea("toHtmlString");&lt;br /&gt;&lt;br /&gt;// Insert a specify Image that you want&lt;br /&gt;$("#txtCustomHtmlArea").htmlarea("image", "image.jpg");&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The jHtmlArea object has a few more methods, you can find out what they are by referencing the Visual Studio JavaScript Intellisense File ("jHtmlArea-0.5.0-vsdoc.js") or the un-minified source code itself.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;As you can see the jHtmlEditor has some really simple extensibility points. I hope you enjoy using this editor as much as I do. Also, if you have any suggestions/issues, please go to the &lt;a href="http://jhtmlarea.codeplex.com/WorkItem/List.aspx"&gt;official jHtmlArea project's Issue Tracker&lt;/a&gt; and let me know.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zAyT5Z4SEdfbZ5QtME2Zt456hZU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zAyT5Z4SEdfbZ5QtME2Zt456hZU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zAyT5Z4SEdfbZ5QtME2Zt456hZU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zAyT5Z4SEdfbZ5QtME2Zt456hZU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=v72eC8ipCnQ:HhbzxAT0DCI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=v72eC8ipCnQ:HhbzxAT0DCI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=v72eC8ipCnQ:HhbzxAT0DCI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=v72eC8ipCnQ:HhbzxAT0DCI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=v72eC8ipCnQ:HhbzxAT0DCI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/v72eC8ipCnQ" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/07/21/jHtmlArea-The-all-NEW-HTML-WYSIWYG-Editor-for-jQuery.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/07/21/jHtmlArea-The-all-NEW-HTML-WYSIWYG-Editor-for-jQuery.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=9b322f99-5f61-45ac-902f-656e26f1253e</guid>
      <pubDate>Tue, 21 Jul 2009 19:11:00 -0600</pubDate>
      <category>JavaScript</category>
      <category>JavaScript</category>
      <category>jquery</category>
      <category>jquery</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=9b322f99-5f61-45ac-902f-656e26f1253e</pingback:target>
      <slash:comments>43</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=9b322f99-5f61-45ac-902f-656e26f1253e</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/07/21/jHtmlArea-The-all-NEW-HTML-WYSIWYG-Editor-for-jQuery.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=9b322f99-5f61-45ac-902f-656e26f1253e</wfw:commentRss>
    </item>
    <item>
      <title>Adding a DotNetKicks Image/Badge via jQuery</title>
      <description>&lt;p&gt;A while ago Jon Galloway posted a short article titled "&lt;a href="http://weblogs.asp.net/jgalloway/archive/2007/03/08/adding-a-dotnetkicks-image-via-javascript.aspx"&gt;Adding a DotNetKicks image via JavaScript&lt;/a&gt;" which contains the small amount of JavaScript code necessary to add a &lt;a href="http://www.dotnetkicks.com/docs/kickitbadge"&gt;DotNetKicks.com Image / Badge&lt;/a&gt; to your web pages. The DotNetKicks Badge is essentially a link that allows users to go to &lt;a href="http://dotnetkicks.com"&gt;DotNetKicks.com&lt;/a&gt; to vote for you web page, and the badge also displays the total number of "kicks" that your page has received. Since &lt;a href="http://jquery.com"&gt;jQuery&lt;/a&gt; has become insanely popular since Jon originally posted his JavaScript code, I thought I would post a jQuery version of his code.&lt;/p&gt;
&lt;p&gt;Here's a simple demonstration of the DotNetKicks.com Badge that the below jQuery/JavaScript code will generate:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fpietschsoft.com%2Fpost%2F2009%2F07%2F20%2FAdding-a-DotNetKicks-ImageBadge-via-jQuery.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3A%2F%2Fpietschsoft.com%2Fpost%2F2009%2F07%2F20%2FAdding-a-DotNetKicks-ImageBadge-via-jQuery.aspx&amp;amp;bgcolor=0099FF" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To use the below code you just need to follow the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a &amp;lt;DIV&amp;gt; element wher you want the badge to be displayed.&lt;/li&gt;
&lt;li&gt;Set the &amp;lt;DIV&amp;gt;'s ID to 'postToolbar'.&lt;/li&gt;
&lt;li&gt;Make sure that the &lt;a href="http://jquery.com"&gt;jQuery Library&lt;/a&gt; is included within the page.&lt;/li&gt;
&lt;li&gt;Include the below jQuery / JavaScript code within the page.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here's the jQuery / JavaScript code:&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;$(&lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; currentPageUrl = document.location.protocol + &lt;span class="str"&gt;"//"&lt;/span&gt; + document.location.host + document.location.pathname;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span class="str"&gt;'#postToolbar'&lt;/span&gt;).append(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span class="str"&gt;'&amp;lt;a/&amp;gt;'&lt;/span&gt;).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attr(&lt;span class="str"&gt;'href'&lt;/span&gt;, &lt;span class="str"&gt;'http://www.dotnetkicks.com/kick/?url='&lt;/span&gt; + currentPageUrl).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; css({ border: &lt;span class="str"&gt;'none'&lt;/span&gt; }).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; append(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span class="str"&gt;'&amp;lt;img/&amp;gt;'&lt;/span&gt;).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attr(&lt;span class="str"&gt;'src'&lt;/span&gt;, &lt;span class="str"&gt;'http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url='&lt;/span&gt; + currentPageUrl).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; css({ border: &lt;span class="str"&gt;'none'&lt;/span&gt; })&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br /&gt;});&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6q5jRJBgaYCTRAhO14VlE8L-nbQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6q5jRJBgaYCTRAhO14VlE8L-nbQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6q5jRJBgaYCTRAhO14VlE8L-nbQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6q5jRJBgaYCTRAhO14VlE8L-nbQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=DshDSG9mZ0Q:45I4olzB2p0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=DshDSG9mZ0Q:45I4olzB2p0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=DshDSG9mZ0Q:45I4olzB2p0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=DshDSG9mZ0Q:45I4olzB2p0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=DshDSG9mZ0Q:45I4olzB2p0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/DshDSG9mZ0Q" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/07/20/Adding-a-DotNetKicks-ImageBadge-via-jQuery.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/07/20/Adding-a-DotNetKicks-ImageBadge-via-jQuery.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=0c65924b-8ae3-4375-b115-c216ac01f489</guid>
      <pubDate>Mon, 20 Jul 2009 18:08:00 -0600</pubDate>
      <category>JavaScript</category>
      <category>jquery</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=0c65924b-8ae3-4375-b115-c216ac01f489</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=0c65924b-8ae3-4375-b115-c216ac01f489</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/07/20/Adding-a-DotNetKicks-ImageBadge-via-jQuery.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=0c65924b-8ae3-4375-b115-c216ac01f489</wfw:commentRss>
    </item>
    <item>
      <title>Creating Ruby-like "Extensions" in JavaScript</title>
      <description>&lt;p&gt;I've been spending a little time here and there learning Ruby. I haven't dug much into Rails yet, but have mostly been just focusing on the Ruby language and what it has to offer. Ruby has some nice "helper" methods attached to it's base data types that make iterations and other simple operations even simpler. I've ported a couple of these methods over to JavaScript so I could play around with using some of these "Ruby-isms" with my favorite web-based, dynamic programming language.&lt;/p&gt;
&lt;p&gt;Below are some example usages of each of the methods I ported over to JavaScript. Below are methods that extend the JavaScript "Array", "Number" and "String" data types. The Array "pop" and "join" methods are already Native to JavaScript and don't need any additional coding to be able to utilize them.&lt;/p&gt;
&lt;p&gt;My favorite of these methods has to be the Array.times and String.times methods that allow you to more easily iterate over an array or repeat a string a certain number of times.&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; test = &lt;span class="str"&gt;""&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;(10).times(&lt;span class="kwrd"&gt;function&lt;/span&gt;(i) { test += i; }); &lt;span class="rem"&gt;// outputs - test = "0123456789"&lt;br /&gt;&lt;br /&gt;test = "Chris".reverse(); // outputs "sirhC"&lt;br /&gt;&lt;br /&gt;test = "Chris".upcase(); // outputs "CHRIS"&lt;br /&gt;test = "ChRiS".downcase(); // outputs "chris"&lt;br /&gt;&lt;br /&gt;test = "";&lt;br /&gt;(5).upto(10, function(start, end) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; test += this;&lt;br /&gt;}); // outputs - test = "5678910"&lt;br /&gt;&lt;br /&gt;test = "";&lt;br /&gt;(10).downto(5, function(start, end) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; test += this;&lt;br /&gt;}); // outputs - test = "1098765"&lt;br /&gt;&lt;br /&gt;test = "";&lt;br /&gt;(0).step(10, 5, function(start, end, step) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; test += this;&lt;br /&gt;}); // outputs - test = "0510"&lt;br /&gt;&lt;br /&gt;test = "";&lt;br /&gt;(10).step(0, 5, function(start, end, step) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; test += this;&lt;br /&gt;}); // outputs - test = "1050"&lt;br /&gt;&lt;br /&gt;test = "Chris".chop(); // outputs "Chri"&lt;br /&gt;&lt;br /&gt;test = "Fish".times(3); // outputs "FishFishFish"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var a = ["Chris", "John", "Joe", "Steve"];&lt;br /&gt;test = a.pop(); // &amp;lt;-- native JavaScript feature, same as in Ruby&lt;br /&gt;test = a.join(); // &amp;lt;-- native JavaScript feature, same as in Ruby&lt;br /&gt;test = a.join(","); // &amp;lt;-- native JavaScript feature, same as in Ruby&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;test = "";&lt;br /&gt;[1, 2, "3", "Chris"].each(function(array, index) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; test = test + this + ",";&lt;br /&gt;}); // outputs - test = "1,2,3,Chris,"&lt;br /&gt;&lt;br /&gt;test = [1, 2, 3, 4, 5].collect(function(array, index) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this * 2;&lt;br /&gt;}); // outputs [2, 4, 6, 8, 10]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;test = [].empty(); // outputs - true&lt;br /&gt;test = [1, 2].empty(); // outputs - false&lt;br /&gt;&lt;br /&gt;// These "first" and "last" examples use the "a" array defined above&lt;br /&gt;test = a.first(); // outputs "Chris"&lt;br /&gt;test = a.first(2); // outputs ["Chris", "John"]&lt;br /&gt;test = a.last(); // outputs "Steve"&lt;br /&gt;test = a.last(2); // outputs ["Steve", "Joe"]&lt;br /&gt;test = a.last(15);&amp;nbsp; // &amp;lt;-- if array is shorter than the length specified, it just returns the entire array&lt;br /&gt;test = a.first(15); // &amp;lt;-- if array is shorter than the length specified, it just returns the entire array&lt;br /&gt;&lt;br /&gt;test = a.reverse(); // &amp;lt;-- both Arrays and Strings can be reversed&lt;/p&gt;&lt;/span&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Here's the code for the JavaScript "extensions" that are demonstrated above:&lt;/p&gt;
&lt;p&gt;&lt;div class="code"&gt;
&lt;/p&gt;
&lt;p&gt;Array.prototype.collect = &lt;span class="kwrd"&gt;function&lt;/span&gt;(f) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; newArray = [];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;this&lt;/span&gt;.each(&lt;span class="kwrd"&gt;function&lt;/span&gt;(array, index) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newArray[index] = f.apply(array[index], [array, index]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; newArray;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Array.prototype.each = &lt;span class="kwrd"&gt;function&lt;/span&gt;(f) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i =&amp;nbsp; 0; i &amp;lt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.length; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.apply(&lt;span class="kwrd"&gt;this&lt;/span&gt;[i], [&lt;span class="kwrd"&gt;this&lt;/span&gt;, i]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Array.prototype.empty = &lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; (&lt;span class="kwrd"&gt;this&lt;/span&gt;.length === 0);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Array.prototype.first = &lt;span class="kwrd"&gt;function&lt;/span&gt;(n) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (n) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (n &amp;gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.length) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class="kwrd"&gt;else&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; r = []&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = 0; i &amp;lt; n; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r.push(&lt;span class="kwrd"&gt;this&lt;/span&gt;[i]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; r;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class="kwrd"&gt;else&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;[0];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Array.prototype.last = &lt;span class="kwrd"&gt;function&lt;/span&gt;(n) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (n) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (n &amp;gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.length) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class="kwrd"&gt;else&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; r = [];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = &lt;span class="kwrd"&gt;this&lt;/span&gt;.length - n; i &amp;lt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.length; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r.push(&lt;span class="kwrd"&gt;this&lt;/span&gt;[i]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; r;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class="kwrd"&gt;else&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;[&lt;span class="kwrd"&gt;this&lt;/span&gt;.length - 1];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Array.prototype.reverse = &lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; r = [];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = &lt;span class="kwrd"&gt;this&lt;/span&gt;.length - 1; i &amp;gt;= 0; i--) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r.push(&lt;span class="kwrd"&gt;this&lt;/span&gt;[i]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; r;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Number.prototype.times = &lt;span class="kwrd"&gt;function&lt;/span&gt;(f) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = 0; i &amp;lt; &lt;span class="kwrd"&gt;this&lt;/span&gt;; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.apply(i, [&lt;span class="kwrd"&gt;this&lt;/span&gt;]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Number.prototype.upto = &lt;span class="kwrd"&gt;function&lt;/span&gt;(end, f) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;this&lt;/span&gt;.step(end, 1, f);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Number.prototype.downto = &lt;span class="kwrd"&gt;function&lt;/span&gt;(end, f) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;this&lt;/span&gt;.step(end, 1, f);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Number.prototype.step = &lt;span class="kwrd"&gt;function&lt;/span&gt;(end, step, f) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;this&lt;/span&gt; &amp;lt;= end) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = &lt;span class="kwrd"&gt;this&lt;/span&gt;; i &amp;lt;= end; i += step) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.apply(i, [&lt;span class="kwrd"&gt;this&lt;/span&gt;, end, step]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;span class="kwrd"&gt;else&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = &lt;span class="kwrd"&gt;this&lt;/span&gt;; i &amp;gt;= end; i -= step) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.apply(i, [&lt;span class="kwrd"&gt;this&lt;/span&gt;, end, step]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;String.prototype.chop = &lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.substr(0, &lt;span class="kwrd"&gt;this&lt;/span&gt;.length - 1);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;String.prototype.downcase = &lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.toLowerCase();&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;String.prototype.reverse = &lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; r = &lt;span class="str"&gt;""&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = &lt;span class="kwrd"&gt;this&lt;/span&gt;.length - 1; i &amp;gt;= 0; i--) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r += &lt;span class="kwrd"&gt;this&lt;/span&gt;.charAt(i);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; r;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;String.prototype.times = &lt;span class="kwrd"&gt;function&lt;/span&gt;(n) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;var&lt;/span&gt; r = &lt;span class="str"&gt;""&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = 1; i &amp;lt;= n; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; r += &lt;span class="kwrd"&gt;this&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; r;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;String.prototype.upcase = &lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.toUpperCase();&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is just something that I was playing around with, so I thought I'd post it to share. Also, I know these methods are pretty much getting placed within the "global namespace" of the Array, Number and String data/object types, but you can't place them within a "sub-namespace" if you want to keep them as "Ruby-like" as possible. I even think that the JavaScript / ECMAScript language could probably benefit from some of the methods being added to the language specification and implemented directly within the web browsers.&lt;/p&gt;
&lt;p&gt;If you have any thoughts on this, please post a comment.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FPc3m8bm-8aIgOKOFiNZTs2JHRA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FPc3m8bm-8aIgOKOFiNZTs2JHRA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FPc3m8bm-8aIgOKOFiNZTs2JHRA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FPc3m8bm-8aIgOKOFiNZTs2JHRA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=x1wy32buvdg:TEoGEhqcUO4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=x1wy32buvdg:TEoGEhqcUO4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=x1wy32buvdg:TEoGEhqcUO4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=x1wy32buvdg:TEoGEhqcUO4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=x1wy32buvdg:TEoGEhqcUO4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/x1wy32buvdg" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/07/16/Creating-Ruby-like-Extensions-in-JavaScript.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/07/16/Creating-Ruby-like-Extensions-in-JavaScript.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=091362bb-cfb5-40c8-abff-bdb4156ca837</guid>
      <pubDate>Thu, 16 Jul 2009 11:48:00 -0600</pubDate>
      <category>JavaScript</category>
      <category>Ruby</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=091362bb-cfb5-40c8-abff-bdb4156ca837</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=091362bb-cfb5-40c8-abff-bdb4156ca837</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/07/16/Creating-Ruby-like-Extensions-in-JavaScript.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=091362bb-cfb5-40c8-abff-bdb4156ca837</wfw:commentRss>
    </item>
    <item>
      <title>What's the Minimum Hosting Cost for Windows Azure?</title>
      <description>&lt;p&gt;&lt;img style="float: right;" src="http://pietschsoft.com/image.axd?picture=2009%2f7%2fazure-logo.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Microsoft has announced the &lt;a href="http://blogs.msdn.com/windowsazure/archive/2009/07/14/confirming-commercial-availability-and-announcing-business-model.aspx"&gt;initial pricing for Windows Azure, SQL Azure and .NET Services&lt;/a&gt;. My question is still "&lt;strong&gt;What is the Minimum it will cost to host a small website/application on Azure?&lt;/strong&gt;"&lt;br /&gt;&lt;br /&gt;If your application is racking up "Compute" time when ever it is "live", then that equals a total of approximately 720 hours of "compute" time for a total of $86.40 per month.&lt;br /&gt;&lt;br /&gt;If you store less than 1GB of files, that's $0.15 per month.&lt;br /&gt;&lt;br /&gt;Then if you also use a database with SQL Azure, that's an additional $9.99 per month for up to a 1GB relational database.&lt;br /&gt;&lt;br /&gt;Now if the website uses 10GB of bandwidth (that's how much my blog used last month), then that's about $1.50 per month.&lt;br /&gt;&lt;br /&gt;If you add all these up, that's a &lt;strong&gt;Total of $98.04!&lt;/strong&gt; And that looks like the very minimum cost of hosting an average "small" app/website on Azure. That surely doesn't make me want to switch my DiscountASP.NET and GoDaddy.com hosting accounts over to Windows Azure.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;I can't believe Microsoft isn't making it cheaper to host a small website on Azure, by making the "Compute" time so expensive. Unless of course I'm misunderstanding how "Compute" time is calculated. Does anyone know if I am correct in assuming that 1 full day of hosting your application will rack up 24 hours of total "Compute" time? I hope I'm wrong on this.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Below is a summary of the pricing:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Windows Azure:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Compute @ $0.12 / hour&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Storage @ $0.15 / GB stored&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Storage Transactions @ $0.01 / 10K&lt;br /&gt;&lt;br /&gt;SQL Azure:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Web Edition &amp;ndash; Up to 1 GB relational database @ $9.99&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Business Edition &amp;ndash; Up to 10 GB relational database @ $99.99&lt;br /&gt;&lt;br /&gt;Bandwidth across all three services will be charged at $0.10 in / $0.15 out / GB&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/windowsazure/archive/2009/07/14/confirming-commercial-availability-and-announcing-business-model.aspx"&gt;More Info on Azure Pricing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NOgp_keYKe_pco5Au3ZChAyzf9c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NOgp_keYKe_pco5Au3ZChAyzf9c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NOgp_keYKe_pco5Au3ZChAyzf9c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NOgp_keYKe_pco5Au3ZChAyzf9c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q2TVMOFEj2c:idwLEDrut7k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q2TVMOFEj2c:idwLEDrut7k:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=q2TVMOFEj2c:idwLEDrut7k:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q2TVMOFEj2c:idwLEDrut7k:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=q2TVMOFEj2c:idwLEDrut7k:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/q2TVMOFEj2c" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/07/14/Minimum-Hosting-Cost-for-Windows-Azure.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/07/14/Minimum-Hosting-Cost-for-Windows-Azure.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=73f87ea2-e1fe-4231-b8b9-c849938fad4e</guid>
      <pubDate>Tue, 14 Jul 2009 15:36:00 -0600</pubDate>
      <category>General</category>
      <category>Azure</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=73f87ea2-e1fe-4231-b8b9-c849938fad4e</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=73f87ea2-e1fe-4231-b8b9-c849938fad4e</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/07/14/Minimum-Hosting-Cost-for-Windows-Azure.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=73f87ea2-e1fe-4231-b8b9-c849938fad4e</wfw:commentRss>
    </item>
    <item>
      <title>Managed JScript on the DLR from Microsoft is DEAD!! WHY?!??</title>
      <description>&lt;p&gt;I’ve been questioning &lt;a href="http://stackoverflow.com/questions/775339/where-can-you-download-managed-jscript-for-the-dlr" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://channel9.msdn.com/shows/Going+Deep/John-Lam-and-Martin-Maly-Deep-DLR/?CommentID=472957" target="_blank"&gt;there&lt;/a&gt; as to what happened to Managed JScript on the Dynamic Language Runtime. The most recent preview release is really old, and it has since been taken out of any further preview releases of the DLR, where as IronRuby and IronPython continue on.&lt;/p&gt;  &lt;h3&gt;No More Managed JScript on the DLR?&lt;/h3&gt;  &lt;p&gt;For some time I never really got any good answers. Well, it’s really sad to hear that apparently Microsoft decided to drop it completely.&lt;/p&gt;  &lt;p&gt;According the &lt;a href="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121" target="_blank"&gt;this link&lt;/a&gt;, a member on the DLR team has this to say:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“The DLR JScript was experimental for informing the design of the DLR (expression trees, interop, callsites, hosting, etc.). The JS we released with asp futures and the Silverlight dynamic sdk became very old and unserviceable as the DLR continued evolving for release in CLR 4.0. unfortunately, there are no plans at this time to develop and release a DLR hostable JScript.”&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;“Experimental for informing the design”??&lt;/h3&gt;  &lt;p&gt;I understand what this means, but since Managed JScript was used to help build the DLR from the beginning then “Why didn’t they keep it up to date?”&lt;/p&gt;  &lt;p&gt;Plus if you go read the &lt;a href="http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx" target="_blank"&gt;Initial Announcement of Managed JScript&lt;/a&gt; over on the JScript Blog you will see the following statement:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“We are working to make sure that Managed JScript is a first class language on top of DLR.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;What part of that post and the above statement specify that it’s only “experimental” and not to actually ever get released?&lt;/p&gt;  &lt;p&gt;I’m really curious to find out who actually made the decision to drop it, and what the real reason is. Was it you &lt;a href="http://weblogs.asp.net/scottgu/" target="_blank"&gt;ScottGu&lt;/a&gt;?&lt;/p&gt;  &lt;h3&gt;Why not Open Source it?&lt;/h3&gt;  &lt;p&gt;Well, the next logical question to ask is “Why not release what was done for Managed JScript as Open Source under a Public License?” At least this way it would allow the community to take it and run with it.&lt;/p&gt;  &lt;h3&gt;Are there Alternative Implementations?&lt;/h3&gt;  &lt;p&gt;None that I could find for .NET and/or the DLR. If you know of any, please let me know!&lt;/p&gt;  &lt;p&gt;I did however find the &lt;a href="http://www.mozilla.org/rhino/" target="_blank"&gt;Rhino project from Mozilla&lt;/a&gt;, but it’s for Java. According to Mozilla, &lt;em&gt;“Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users.”&amp;#160; &lt;/em&gt;I guess this could be a start at building one for .NET/DLR, but…&lt;/p&gt;  &lt;p&gt;Update: I did find the &lt;a href="http://myjscript.codeplex.com/" target="_blank"&gt;MyJScript&lt;/a&gt; project on CodePlex; it’s not a complete implemenation, but it does show the basics on how to create your own scripting language on the DLR. There is also an companion article to the MyJScript project: &lt;a title="http://www.dotnetguru.org/us/dlrus/DLR2.htm" href="http://www.dotnetguru.org/us/dlrus/DLR2.htm"&gt;http://www.dotnetguru.org/us/dlrus/DLR2.htm&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Further Info&lt;/h3&gt;  &lt;p&gt;Here’s a few links that have some small bits of info in addition to that linked above:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121" href="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121"&gt;http://dlr.codeplex.com/Thread/View.aspx?ThreadId=58121&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=41990" href="http://dlr.codeplex.com/Thread/View.aspx?ThreadId=41990"&gt;http://dlr.codeplex.com/Thread/View.aspx?ThreadId=41990&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://channel9.msdn.com/posts/Charles/Jimmy-Schementi-Inside-IronRuby/?CommentID=472955" href="http://channel9.msdn.com/posts/Charles/Jimmy-Schementi-Inside-IronRuby/?CommentID=472955"&gt;http://channel9.msdn.com/posts/Charles/Jimmy-Schementi-Inside-IronRuby/?CommentID=472955&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://channel9.msdn.com/shows/Going+Deep/John-Lam-and-Martin-Maly-Deep-DLR/?CommentID=472957" href="http://channel9.msdn.com/shows/Going+Deep/John-Lam-and-Martin-Maly-Deep-DLR/?CommentID=472957"&gt;http://channel9.msdn.com/shows/Going+Deep/John-Lam-and-Martin-Maly-Deep-DLR/?CommentID=472957&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx" href="http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx"&gt;http://blogs.msdn.com/jscript/archive/2007/05/04/managed-jscript-announced.aspx&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Conclusion&lt;/h3&gt;  &lt;p&gt;I’ve very disappointed to hear this sad news. However, I guess I could always work on building my own Managed JScript compiler/library for the DLR; if I could only find the time in between my other open source work and other paying gigs.&lt;/p&gt;  &lt;p&gt;Until then, I guess I can only hope that Microsoft (or would it be &lt;a href="http://weblogs.asp.net/scottgu/" target="_blank"&gt;ScottGu&lt;/a&gt;) decides to reconsider.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8crZN5jDMuj67juciirtMl1QohE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8crZN5jDMuj67juciirtMl1QohE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8crZN5jDMuj67juciirtMl1QohE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8crZN5jDMuj67juciirtMl1QohE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=aZDwJ3o8R9I:SUr1ACH9R7I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=aZDwJ3o8R9I:SUr1ACH9R7I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=aZDwJ3o8R9I:SUr1ACH9R7I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=aZDwJ3o8R9I:SUr1ACH9R7I:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=aZDwJ3o8R9I:SUr1ACH9R7I:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/aZDwJ3o8R9I" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/06/12/Managed-JScript-on-the-DLR-from-Microsoft-is-DEAD-Why.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/06/12/Managed-JScript-on-the-DLR-from-Microsoft-is-DEAD-Why.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=dc3bbf5e-2708-4f70-b67a-cba6fb779a8b</guid>
      <pubDate>Fri, 12 Jun 2009 15:03:28 -0600</pubDate>
      <category>JavaScript</category>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=dc3bbf5e-2708-4f70-b67a-cba6fb779a8b</pingback:target>
      <slash:comments>55</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=dc3bbf5e-2708-4f70-b67a-cba6fb779a8b</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/06/12/Managed-JScript-on-the-DLR-from-Microsoft-is-DEAD-Why.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=dc3bbf5e-2708-4f70-b67a-cba6fb779a8b</wfw:commentRss>
    </item>
    <item>
      <title>Building JavaScript / HTML based Applications using Adobe Air for FREE</title>
      <description>&lt;p&gt;As a web developer I use JavaScript, HTML and CSS a lot. I do however build desktop applications too, but can&amp;rsquo;t use those same tools/languages to build them. So, for quite some time now I&amp;rsquo;ve wanted to be able to build Desktop Applications using the same JavaScript, HTML and CSS that I use to build Web Applications. Now with the help of Adobe AIR it can finally be done with ease, and even have multi-platform support.&lt;/p&gt;
&lt;p&gt;In this post I&amp;rsquo;m going to discuss the basics of creating a JavaScript/HTML based Desktop Application using Adobe AIR, and point you to some of the online resources that have helped me to get started.&lt;/p&gt;
&lt;p&gt;Also, just in case you didn&amp;rsquo;t know, you can create/build JavaScript / HTML based Adobe AIR applications for FREE. The runtime and sdk are both free.&lt;/p&gt;
&lt;h3&gt;Getting Started with Adobe AIR&lt;/h3&gt;
&lt;p&gt;First you&amp;rsquo;ll need to get the following two things installed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adobe AIR &amp;ndash; &lt;a href="http://get.adobe.com/air"&gt;http://get.adobe.com/air&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Adobe AIR SDK &amp;ndash; &lt;a title="http://www.adobe.com/products/air/tools/sdk/" href="http://www.adobe.com/products/air/tools/sdk/"&gt;http://www.adobe.com/products/air/tools/sdk/&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&amp;rsquo;s a couple excellent resources I found to getting started with Adobe AIR and JavaScript:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7ecc.html" target="_blank"&gt;Creating your first HTML-based AIR application with the AIR SDK&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.petefreitag.com/item/667.cfm" target="_blank"&gt;Adobe AIR Tutorial for HTML / JavaScript Developers&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="http://ajaxian.com/archives/adobe-air-for-javascript-developers-pocketguide" target="_blank"&gt;Adobe AIR for JavaScript Developers FREE Pocket Guide&lt;/a&gt; &amp;ndash; Direct &lt;a href="http://onair.adobe.com/files/AIRforJSDevPocketGuide.pdf?sdid=CEYFA" target="_blank"&gt;Download of PDF&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can follow those two guides linked to above to get you started using Adobe AIR to build JavaScript / HTML based Desktop Applications.&lt;/p&gt;
&lt;h3&gt;Setting Up the Adobe AIR SDK on Windows&lt;/h3&gt;
&lt;p&gt;I had a couple small setup issues with getting the Adobe AIR SDK setup on my Windows development box.&lt;/p&gt;
&lt;p&gt;The Adobe AIR SDK download is just a Zip Archive containing the files necessary for the SDK; it contains no setup EXE. To get it setup, you&amp;rsquo;ll need to follow the below steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extract the SDK to some folder of your choosing. For Example: &lt;em&gt;C:\AdobeAIRSDK&lt;/em&gt; &lt;/li&gt;
&lt;li&gt;Add the &lt;em&gt;&amp;ldquo;C:\AdobeAIRSDK\bin&amp;rdquo; &lt;/em&gt;folder to the System Path so you can execute it easily from within the Command Line. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, to use the Adobe Developer Tool (adt) you&amp;rsquo;ll need Java installed, and you&amp;rsquo;ll need to make sure that the path to where Java is installed is also included within the System Path as described above.&lt;/p&gt;
&lt;p&gt;To edit the &amp;ldquo;System Path&amp;rdquo; in Windows just follow these steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open the System Properties dialog box and click the Advanced tab. You can find this in the System settings within the Control Panel. &lt;/li&gt;
&lt;li&gt;Click the Environment Variables button. &lt;/li&gt;
&lt;li&gt;Select the PATH entry and then click the Edit button. Add the desired path to the end of the current variable value, separating it from previous values with a semicolon. For Example &lt;em&gt;&amp;ldquo;;C:\AdobeAIRSDK\bin&amp;rdquo;&lt;/em&gt; &lt;/li&gt;
&lt;li&gt;Click OK to Save. &lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Tips to Make Building and Testing Easier&lt;/h3&gt;
&lt;p&gt;Here are some simple tips to make building and testing your applications easier.&lt;/p&gt;
&lt;h5&gt;Create .BAT files to Build and Test&lt;/h5&gt;
&lt;p&gt;One thing that you'&amp;rsquo;ll want to do to make it a little easier to Build (using adt) and Test (using adl) your HTML-based Adobe AIR applications is create some simple &amp;ldquo;build.bat&amp;rdquo; and &amp;ldquo;test.bat&amp;rdquo; DOS Batch files so you don&amp;rsquo;t have to type in the command-line parameters every time you want to build or test your application.&lt;/p&gt;
&lt;p&gt;build.bat example:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;adt &amp;ndash;package &amp;ndash;storetype pkcs12 &amp;ndash;keystore certificate MyApp.air application.xml .&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;test.bat example:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;adl application.xml&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This way you can just simply double-click on the specific .BAT file within Windows Explorer to either Build or Test your application.&lt;/p&gt;
&lt;p&gt;Also, in the above build.bat example, my Certificate file is simply named &amp;ldquo;certificate&amp;rdquo;, and it&amp;rsquo;s a self-signed certificate.&lt;/p&gt;
&lt;h5&gt;Place Application Files within a Sub-Folder&lt;/h5&gt;
&lt;p&gt;If you rename your &amp;ldquo;.air&amp;rdquo; file that was built using the above mentioned .BAT file to be a &amp;ldquo;.ZIP&amp;rdquo; file and then open it, you&amp;rsquo;ll notice that the .BAT files and your Certificate were included within the Build. This is because the above mentioned call to &amp;ldquo;adt&amp;rdquo; tells it to include all files and folders within the build. To prevent the .BAT files and Certificate from being included, you&amp;rsquo;ll need to place them within a separate folder.&lt;/p&gt;
&lt;p&gt;The easiest way to do this is to place all you Application files within a Sub-Folder within the main folder that your .BAT files and Certificate are located. For example you could name it &amp;ldquo;App_Files&amp;rdquo;. Then make the following changes to the .BAT files to point it to the new file/folder locations appropriately:&lt;/p&gt;
&lt;p&gt;build.bat example:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;cd App_Files      &lt;br /&gt;adt &amp;ndash;package &amp;ndash;storetype pkcs12 &amp;ndash;keystore ../certificate ../MyApp.air application.xml .&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;test.bat example&lt;/p&gt;
&lt;p&gt;&lt;em&gt;cd App_Files      &lt;br /&gt;adl application.xml&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Also, one thing to note about the above modified &amp;ldquo;build.bat&amp;rdquo; file is that it will place the Built &amp;ldquo;.air&amp;rdquo; file/application within the Main folder where the .BAT files and Certificate are located.&lt;/p&gt;
&lt;h3&gt;Creating a Self-Signed Certificate&lt;/h3&gt;
&lt;p&gt;One thing that you&amp;rsquo;ll notice above is that I&amp;rsquo;m using a Certificate file names &amp;ldquo;&lt;em&gt;certificate&lt;/em&gt;&amp;rdquo;. This is a self-signed certificate that I generated using the &amp;ldquo;adt&amp;rdquo; tool. To generate a self-signed certificate, you can execute &amp;ldquo;adt&amp;rdquo; using the following command-line parameters:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;adt &amp;ndash;certificate &amp;ndash;cn SelfSigned 1024-RSA certificate.pfx samplePassword&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;The above is pretty much the extent of my knowledge of building Adobe AIR applications using JavaScript / HTML at the time of this writing. I decided to take a few minutes to figure out the basics, so I thought I&amp;rsquo;d share some of the tidbits I found out.&lt;/p&gt;
&lt;p&gt;Since, I&amp;rsquo;ve wanted to build desktop applications using JavaScript, HTML and CSS for some time now I find it relieving that it can be done with Adobe AIR and for Free.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_PJGlrfespFV5yBH7tYTDXEd7yQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_PJGlrfespFV5yBH7tYTDXEd7yQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_PJGlrfespFV5yBH7tYTDXEd7yQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_PJGlrfespFV5yBH7tYTDXEd7yQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vtacER32KYg:Dqm5fNLEmok:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vtacER32KYg:Dqm5fNLEmok:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=vtacER32KYg:Dqm5fNLEmok:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=vtacER32KYg:Dqm5fNLEmok:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=vtacER32KYg:Dqm5fNLEmok:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/vtacER32KYg" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/06/10/Building-JavaScript-HTML-Applications-using-Adobe-AIR-for-FREE.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/06/10/Building-JavaScript-HTML-Applications-using-Adobe-AIR-for-FREE.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=b5ce781e-d427-42d2-95c7-d01f6cf3c690</guid>
      <pubDate>Wed, 10 Jun 2009 20:44:00 -0600</pubDate>
      <category>Adobe AIR</category>
      <category>JavaScript</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=b5ce781e-d427-42d2-95c7-d01f6cf3c690</pingback:target>
      <slash:comments>14</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=b5ce781e-d427-42d2-95c7-d01f6cf3c690</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/06/10/Building-JavaScript-HTML-Applications-using-Adobe-AIR-for-FREE.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=b5ce781e-d427-42d2-95c7-d01f6cf3c690</wfw:commentRss>
    </item>
    <item>
      <title>Bing Maps for Enterprise (formerly Virtual Earth) Licensing FAQ</title>
      <description>&lt;p&gt;I usually get at least 1 email a month asking me some form of the below questions about Virtual Earth / Bing Maps for Enterprise Licensing. So, I’ve decided to post some information on the topic.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I’m not a Bing Maps for Enterprise (formerly&amp;#160; Virtual Earth) Reseller, nor do I work for Microsoft or represent Microsoft in any way; so the following tips/faq are my own opinion and do not represent Microsoft in any way. For official answers, please contact Microsoft directly and refer to the “&lt;a href="http://www.microsoft.com/maps/product/terms.html" target="_blank"&gt;Microsoft Virtual Earth Platform API Terms of Use&lt;/a&gt;.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Email all licensing questions directly to Microsoft at &lt;a href="mailto:maplic@microsoft.com"&gt;maplic@microsoft.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I encourage you to read through the official “&lt;a href="http://www.microsoft.com/maps/product/terms.html" target="_blank"&gt;Microsoft Virtual Eearth Platform API Terms of Use&lt;/a&gt;”. You can also find more information on the “&lt;a href="http://www.microsoft.com/maps/product/licensing.aspx" target="_blank"&gt;Microsoft Bing Maps for Enterprise – Licensing And Pricing Options&lt;/a&gt;” page.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I am not responsible for any actions you take based on the tips/faq provided below. The below is provided for informational purposes only and is not provided as legal advise. It is always recommended you consult an attorney.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Now that I have the disclaimer out of the way…&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Q: Do I need to Pay / License Bing Maps for Enterprise to use the JavaScript Map Control and/or Web Services within my Website / Application?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; There are really two separate answers:&amp;#160; &lt;br /&gt;    &lt;br /&gt;1) &lt;em&gt;Non-Commercial Use:&lt;/em&gt; No, If you are developing or hosting an online application that uses the service to display results for N&lt;strong&gt;on-Commercial Use, &lt;/strong&gt;you do not need to purchase a license agreement from Microsoft.&amp;#160; &lt;br /&gt;    &lt;br /&gt;2) &lt;em&gt;Commercial&amp;#160; or Government Use:&lt;/em&gt; Yes, If you are developing or hosting an online application that uses the service to display results for &lt;strong&gt;Commercial or Government Use&lt;/strong&gt;, then you are required to purchase a license agreement from Microsoft. However, you are allowed to use the service for a 90 day evaluation period before you are required to purchase a license agreement.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;There are some additional restrictions for using the Service for Non-Commercial use and within the 90 day evaluation period; these restrictions are outlined within the official “&lt;/em&gt;&lt;a href="http://www.microsoft.com/maps/product/terms.html" target="_blank"&gt;&lt;em&gt;Microsoft Virtual Earth Platform API Terms of Use&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.”&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Q: Can I use the &lt;a href="http://connect.microsoft.com/silverlightmapcontrolctp" target="_blank"&gt;Silverlight Virtual Earth Control CTP&lt;/a&gt; within a Website / Application?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A: &lt;/strong&gt;Officially, the answer is &lt;strong&gt;No&lt;/strong&gt;. Since the current release of the Silverlight Virtual Earth Control is a Community Technology Preview (CTP) it is not licensed for use in any Production environments.&amp;#160; Also, there is no support provided for any bugs that you may encounter while using it.     &lt;br /&gt;    &lt;br /&gt;However, you can use the Silverlight Virtual Earth Control CTP for Development and Testing purposes.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Q: Can I use Bing Maps (Virtual Earth) within a Windows Forms or WPF Desktop Application?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; As far as Licensing, you’ll need to contact Microsoft. The “&lt;a href="http://www.microsoft.com/maps/product/terms.html" target="_blank"&gt;Microsoft Virtual Earth Platform API Terms of Use&lt;/a&gt;” doesn’t really cover this specific usage scenario.     &lt;br /&gt;    &lt;br /&gt;Microsoft doesn’t have a Window Forms or WPF control that you can just drag onto a Window, but you could access the Web Service from your application or display the JavaScript Map Control within an embedded WebBrowser control.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Q: Can I use the Virtual Earth Server Control that’s part of the &lt;a href="http://dev.live.com/tools/" target="_blank"&gt;Windows Live Tools CTP&lt;/a&gt; within a Website / Application?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;A: No&lt;/strong&gt;, Since the Windows Live Tools is a Community Technology Preview (CTP) it is not licensed for use in any Production environments, and thus all the controls within the Windows Live Tools CTP are licensed the same.     &lt;br /&gt;    &lt;br /&gt;Also, the Virtual Earth Server Control within the latest release of the Windows Live Tools CTP is buggy and only partially implemented.&lt;/p&gt;  &lt;p&gt;If you are looking for an &lt;a href="http://simplovation.com/page/webmapsve.aspx" target="_blank"&gt;ASP.NET AJAX Bing Maps (Virtual Earth) Server Control&lt;/a&gt; that you CAN use in Production and is Fully Supported, then I encourage you to check out the &lt;a href="http://simplovation.com/page/webmapsve.aspx" target="_blank"&gt;Web.Maps.VE product by Simplovation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tiQOi5MkjR8zk_aea9NROjP3a1k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tiQOi5MkjR8zk_aea9NROjP3a1k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tiQOi5MkjR8zk_aea9NROjP3a1k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tiQOi5MkjR8zk_aea9NROjP3a1k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WFyQNcqMxPo:txu24iu-rTk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WFyQNcqMxPo:txu24iu-rTk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=WFyQNcqMxPo:txu24iu-rTk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=WFyQNcqMxPo:txu24iu-rTk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=WFyQNcqMxPo:txu24iu-rTk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/WFyQNcqMxPo" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/06/02/Bing-Maps-for-Enterprise-Virtual-Earth-Licensing-FAQ-Questions.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/06/02/Bing-Maps-for-Enterprise-Virtual-Earth-Licensing-FAQ-Questions.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=ad070bf0-ed36-4dcf-995a-d8f4217869a3</guid>
      <pubDate>Tue, 02 Jun 2009 18:52:00 -0600</pubDate>
      <category>Bing Maps</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=ad070bf0-ed36-4dcf-995a-d8f4217869a3</pingback:target>
      <slash:comments>22</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=ad070bf0-ed36-4dcf-995a-d8f4217869a3</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/06/02/Bing-Maps-for-Enterprise-Virtual-Earth-Licensing-FAQ-Questions.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=ad070bf0-ed36-4dcf-995a-d8f4217869a3</wfw:commentRss>
    </item>
    <item>
      <title>Virtual Earth Shapes (VEShape) to WKT (Well-Known-Text) and Back using JavaScript</title>
      <description>&lt;p&gt;One of the standard methods of representing geometric shapes is by using the WKT (Well-Known-Text) standard. This is a human readable standard method of representing geometric shapes that can be used to easily pass spatial data between applications. I know GML or GeoRSS may be a little more applicable since they are based on XML, but WKT can work just fine in some cases.&lt;/p&gt;  &lt;p&gt;If you don’t know what WKT is here are a couple links for reference:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/referencing/doc-files/WKT.html" href="http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/referencing/doc-files/WKT.html"&gt;http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/referencing/doc-files/WKT.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://en.wikipedia.org/wiki/Well-known_text" href="http://en.wikipedia.org/wiki/Well-known_text"&gt;http://en.wikipedia.org/wiki/Well-known_text&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This is also one of the things that Virtual Earth does NOT have support built in for. So I wrote a little code that simply converts VEShape objects to a WKT string representation.&lt;/p&gt;  &lt;p&gt;The code below allows you to represent Pushpins, Polygons and Polylines as strings like the following:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;POINT(-99.71000000000001 43.74999999999998)

POLYGON((-99.71000000000001 46.74999999999998,
 -96.71000000000001 46.74999999999998,
 -96.71000000000001 43.74999999999998,
 -99.71000000000001 46.74999999999998))

LINESTRING(-99.71000000000001 40.74999999999998,
 -102.71000000000001 40.74999999999998,
 -102.71000000000001 43.74999999999998)&lt;/pre&gt;

&lt;p&gt;Here are some examples of using the conversion methods:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Get Map Center Point&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; centerPoint = map.GetCenter();

 &lt;span class="rem"&gt;// Create Pushpin VEShape and Get it's WKT representation&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; wktShape = VirtualEarthWKT.ShapeToWKT(&lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(VEShapeType.Pushpin, centerPoint));
 &lt;span class="rem"&gt;// Create a VEShape from the WKT representation&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; shape = VirtualEarthWKT.ShapeFromWKT(wktShape);
 &lt;span class="rem"&gt;// Add VEShape to Map&lt;/span&gt;
 map.AddShape(shape);


 &lt;span class="rem"&gt;// Create Polygons' Location Array&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; polygonLocations = [
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude + 3, centerPoint.Longitude),
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude + 3, centerPoint.Longitude + 3),
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude, centerPoint.Longitude + 3)
 ];

 &lt;span class="rem"&gt;// Create Polygon VEShape and Get it's WKT representation&lt;/span&gt;
 wktShape = VirtualEarthWKT.ShapeToWKT(&lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(VEShapeType.Polygon, polygonLocations));
 &lt;span class="rem"&gt;// Create a VEShape from the WKT representation&lt;/span&gt;
 shape = VirtualEarthWKT.ShapeFromWKT(wktShape);
 &lt;span class="rem"&gt;// Add VEShape to Map&lt;/span&gt;
 map.AddShape(shape);


 &lt;span class="rem"&gt;// Create Polylines' Location Array&lt;/span&gt;
 &lt;span class="kwrd"&gt;var&lt;/span&gt; polylineLocations = [
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude - 3, centerPoint.Longitude),
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude - 3, centerPoint.Longitude - 3),
    &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(centerPoint.Latitude, centerPoint.Longitude - 3)
 ];

 &lt;span class="rem"&gt;// Create Polyline VEShape and Get it's WKT representation&lt;/span&gt;
 wktShape = VirtualEarthWKT.ShapeToWKT(&lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(VEShapeType.Polyline, polylineLocations));
 &lt;span class="rem"&gt;// Create a VEShape from the WKT representation&lt;/span&gt;
 shape = VirtualEarthWKT.ShapeFromWKT(wktShape);
 &lt;span class="rem"&gt;// Add VEShape to Map&lt;/span&gt;
 map.AddShape(shape);&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Here’s the full code to the VirtualEarthWKT object that contains the static methods:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// Create the singleton object that contains the WKT (Well-Known-Text) transformation methods.&lt;/span&gt;
&lt;span class="kwrd"&gt;var&lt;/span&gt; VirtualEarthWKT = &lt;span class="kwrd"&gt;new&lt;/span&gt; (&lt;span class="kwrd"&gt;function&lt;/span&gt;() {
    &lt;span class="rem"&gt;// Declare some &amp;quot;private&amp;quot; methods that will only be used internally&lt;/span&gt;
    &lt;span class="kwrd"&gt;var&lt;/span&gt; priv = {
        trimSpaces: &lt;span class="kwrd"&gt;function&lt;/span&gt;(str) {
            &lt;span class="rem"&gt;// Trim beginning spaces&lt;/span&gt;
            &lt;span class="kwrd"&gt;while&lt;/span&gt; (priv.startsWith(str, &lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt;)) {
                str = str.substring(1);
            }
            &lt;span class="rem"&gt;// Trim ending spaces&lt;/span&gt;
            &lt;span class="kwrd"&gt;while&lt;/span&gt; (priv.endsWith(str, &lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt;)) {
                str = str.substring(0, str.length - 1);
            }
            &lt;span class="kwrd"&gt;return&lt;/span&gt; str;
        },
        startsWith: &lt;span class="kwrd"&gt;function&lt;/span&gt;(str, startstr) {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; str.substring(0, startstr.length) == startstr;
        },
        endsWith: &lt;span class="kwrd"&gt;function&lt;/span&gt;(str, endstr) {
            &lt;span class="kwrd"&gt;return&lt;/span&gt; str.substring(str.length - endstr.length) == endstr;
        }
    };
    &lt;span class="rem"&gt;// Declare the &amp;quot;public&amp;quot; methods that will be exposed&lt;/span&gt;
    &lt;span class="kwrd"&gt;var&lt;/span&gt; that = {
        &lt;span class="rem"&gt;///&amp;lt;summary&amp;gt;Converts a VEShape object to WKT (Well-Known-Text) string representation.&amp;lt;/summary&amp;gt;&lt;/span&gt;
        ShapeToWKT: &lt;span class="kwrd"&gt;function&lt;/span&gt;(shape) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (shape == &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeToWKT: 'shape' parameter can not be null.&amp;quot;&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;var&lt;/span&gt; wktTemplate = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; wktGeomPoints = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;

            &lt;span class="rem"&gt;// Figure out the WKT Geometry Type&lt;/span&gt;
            &lt;span class="kwrd"&gt;switch&lt;/span&gt; (shape.GetType()) {
                &lt;span class="kwrd"&gt;case&lt;/span&gt; VEShapeType.Pushpin:
                    wktTemplate = &lt;span class="str"&gt;&amp;quot;POINT({points})&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;case&lt;/span&gt; VEShapeType.Polygon:
                    wktTemplate = &lt;span class="str"&gt;&amp;quot;POLYGON(({points}))&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;case&lt;/span&gt; VEShapeType.Polyline:
                    wktTemplate = &lt;span class="str"&gt;&amp;quot;LINESTRING({points})&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;default&lt;/span&gt;:
                    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeToWKT: VEShapeType (&amp;quot;&lt;/span&gt; + shape.GetType() + &lt;span class="str"&gt;&amp;quot;) not supported.&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
            }

            &lt;span class="rem"&gt;// Get the List of VELatLong objects represented as WKT compatible list of points&lt;/span&gt;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; shapePoints = shape.GetPoints();
            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = 0; i &amp;lt; shapePoints.length; i++) {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (wktGeomPoints.length &amp;gt; 0) {
                    wktGeomPoints += &lt;span class="str"&gt;&amp;quot;, &amp;quot;&lt;/span&gt;;
                }
                wktGeomPoints += shapePoints[i].Longitude + &lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt; + shapePoints[i].Latitude;
            }

            &lt;span class="rem"&gt;// return WKT representation of the VEShape&lt;/span&gt;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; wktTemplate.replace(&lt;span class="str"&gt;&amp;quot;{points}&amp;quot;&lt;/span&gt;, wktGeomPoints);
        },
        &lt;span class="rem"&gt;///&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span class="rem"&gt;///Converts WKT (Well-Known-Text) string representation of a point/polygon/linestring to a VEShape object.&lt;/span&gt;
        &lt;span class="rem"&gt;///&amp;lt;/summary&amp;gt;&lt;/span&gt;
        ShapeFromWKT: &lt;span class="kwrd"&gt;function&lt;/span&gt;(strWKT) {
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (strWKT == &lt;span class="kwrd"&gt;null&lt;/span&gt;) {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeFromWKT: 'strWKT' parameter can not be null.&amp;quot;&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;if&lt;/span&gt; (strWKT.length == 0) {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeFromWKT: 'strWKT' parameter can not be an empty string.&amp;quot;&lt;/span&gt;;
            }
            &lt;span class="kwrd"&gt;var&lt;/span&gt; shapeType = &lt;span class="kwrd"&gt;null&lt;/span&gt;;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; wktPoints = &lt;span class="kwrd"&gt;null&lt;/span&gt;;

            &lt;span class="rem"&gt;// Get the Shape Type and list of &amp;quot;Longitude Latitude&amp;quot; location points&lt;/span&gt;
            &lt;span class="kwrd"&gt;switch&lt;/span&gt; (strWKT.substring(0, 5).toLowerCase()) {
                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;point&amp;quot;&lt;/span&gt;:
                    shapeType = VEShapeType.Pushpin;
                    wktPoints = strWKT.substring(6, strWKT.length - 1);
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;polyg&amp;quot;&lt;/span&gt;:
                    shapeType = VEShapeType.Polygon;
                    wktPoints = strWKT.substring(9, strWKT.length - 2);
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;lines&amp;quot;&lt;/span&gt;:
                    shapeType = VEShapeType.Polyline;
                    wktPoints = strWKT.substring(11, strWKT.length - 1);
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
                &lt;span class="kwrd"&gt;default&lt;/span&gt;:
                    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;VirtualEarthWKT.ShapeFromWKT: Unknown WKT Geometry Type&amp;quot;&lt;/span&gt;;
                    &lt;span class="kwrd"&gt;break&lt;/span&gt;;
            }

            &lt;span class="rem"&gt;// split out the wkt points to be seperate&lt;/span&gt;
            wktPoints = wktPoints.split(&lt;span class="str"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;);

            &lt;span class="rem"&gt;// Convert the WKT Points to VELatLong locations&lt;/span&gt;
            &lt;span class="kwrd"&gt;var&lt;/span&gt; shapePoints = &lt;span class="kwrd"&gt;new&lt;/span&gt; Array();
            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; i = 0; i &amp;lt; wktPoints.length; i++) {
                &lt;span class="rem"&gt;// Split the &amp;quot;Longitude Latitude&amp;quot; apart&lt;/span&gt;
                &lt;span class="kwrd"&gt;var&lt;/span&gt; loc = priv.trimSpaces(wktPoints[i]).split(&lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt;);
                &lt;span class="rem"&gt;// Create VELatLong location&lt;/span&gt;
                shapePoints[shapePoints.length] = &lt;span class="kwrd"&gt;new&lt;/span&gt; VELatLong(parseFloat(loc[1]), parseFloat(loc[0]));
            }
            
            &lt;span class="rem"&gt;// Return a VEShape that represents this WKT Geometry&lt;/span&gt;
            &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; VEShape(shapeType, shapePoints);
        }
    };
    &lt;span class="rem"&gt;// Return the object that contains the &amp;quot;public&amp;quot; and &amp;quot;private&amp;quot; methods&lt;/span&gt;
    &lt;span class="kwrd"&gt;return&lt;/span&gt; that;
})();&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r5B-_XgiwYo0bzor0_SrRicaV9Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r5B-_XgiwYo0bzor0_SrRicaV9Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r5B-_XgiwYo0bzor0_SrRicaV9Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r5B-_XgiwYo0bzor0_SrRicaV9Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q-yD9YNrI3U:MN6GXZUYr7k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q-yD9YNrI3U:MN6GXZUYr7k:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=q-yD9YNrI3U:MN6GXZUYr7k:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=q-yD9YNrI3U:MN6GXZUYr7k:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=q-yD9YNrI3U:MN6GXZUYr7k:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/q-yD9YNrI3U" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/04/04/Virtual-Earth-Shapes-(VEShape)-to-WKT-(Well-Known-Text)-and-Back-using-JavaScript.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/04/04/Virtual-Earth-Shapes-(VEShape)-to-WKT-(Well-Known-Text)-and-Back-using-JavaScript.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=7b110c3f-e26c-446e-967f-084357c59f31</guid>
      <pubDate>Sat, 04 Apr 2009 12:38:59 -0600</pubDate>
      <category>Bing Maps</category>
      <category>JavaScript</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=7b110c3f-e26c-446e-967f-084357c59f31</pingback:target>
      <slash:comments>14</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=7b110c3f-e26c-446e-967f-084357c59f31</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/04/04/Virtual-Earth-Shapes-(VEShape)-to-WKT-(Well-Known-Text)-and-Back-using-JavaScript.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=7b110c3f-e26c-446e-967f-084357c59f31</wfw:commentRss>
    </item>
    <item>
      <title>Awarded 2009 Microsoft MVP - Windows Live Platform</title>
      <description>&lt;p&gt;&lt;em&gt;&lt;strong&gt;Congratulations 2009 Microsoft MVP!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Dear Chris Pietschmann,&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Congratulations! We are pleased to present you with the 2009 Microsoft&amp;reg; MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say "Thank you for your technical leadership."&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Toby Richards     &lt;br /&gt;General Manager       &lt;br /&gt;Community Support Services&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m lucky enough to be one of the April Fools MVPs. Last year I wasn&amp;rsquo;t sure at first if the email was an April Fools joke or not, and this year I&amp;rsquo;m just as happy that it&amp;rsquo;s not. This marks the second time I&amp;rsquo;ve been awarded Microsoft MVP. Last year I was awarded in the &amp;ldquo;Virtual Earth&amp;rdquo; category, and last fall they renamed me to &amp;ldquo;Windows Live Platform&amp;rdquo;. This year I am awarded in the same &amp;ldquo;Windows Live Platform&amp;rdquo; category.&lt;/p&gt;
&lt;p&gt;In case you&amp;rsquo;re not familiar with the Microsoft MVP Program, here&amp;rsquo;s a link for more information:&lt;/p&gt;
&lt;p&gt;&lt;a title="http://mvp.support.microsoft.com/gp/mvpawardintro" href="http://mvp.support.microsoft.com/gp/mvpawardintro"&gt;http://mvp.support.microsoft.com/gp/mvpawardintro&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And Congratulations to all those that have also been awarded MVP on this April Fools day. Especially to those who&amp;rsquo;ve gotten awarded for the first time; keep it up.&lt;/p&gt;
&lt;p&gt;Thanks!!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://mvp.support.microsoft.com/profile/Pietschmann" target="_blank"&gt;Chris Pietschmann&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/07R3VRWV4AnweCoF1U0UOUeJNMs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/07R3VRWV4AnweCoF1U0UOUeJNMs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/07R3VRWV4AnweCoF1U0UOUeJNMs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/07R3VRWV4AnweCoF1U0UOUeJNMs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=EhKh9YtltMU:7dPdtVOSg4k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=EhKh9YtltMU:7dPdtVOSg4k:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=EhKh9YtltMU:7dPdtVOSg4k:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/crpietschmann?a=EhKh9YtltMU:7dPdtVOSg4k:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/crpietschmann?i=EhKh9YtltMU:7dPdtVOSg4k:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/crpietschmann/~4/EhKh9YtltMU" height="1" width="1"/&gt;</description>
      <link>http://pietschsoft.com/post/2009/04/01/Awarded-2009-Microsoft-MVP-ndash3b-Windows-Live-Platform.aspx</link>
      <author>crpietschmann</author>
      <comments>http://pietschsoft.com/post/2009/04/01/Awarded-2009-Microsoft-MVP-ndash3b-Windows-Live-Platform.aspx#comment</comments>
      <guid>http://pietschsoft.com/post.aspx?id=3314eabf-8818-450e-ad7d-27986a02f641</guid>
      <pubDate>Wed, 01 Apr 2009 16:17:00 -0600</pubDate>
      <category>General</category>
      <dc:publisher>crpietschmann</dc:publisher>
      <pingback:server>http://pietschsoft.com/pingback.axd</pingback:server>
      <pingback:target>http://pietschsoft.com/post.aspx?id=3314eabf-8818-450e-ad7d-27986a02f641</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://pietschsoft.com/trackback.axd?id=3314eabf-8818-450e-ad7d-27986a02f641</trackback:ping>
      <wfw:comment>http://pietschsoft.com/post/2009/04/01/Awarded-2009-Microsoft-MVP-ndash3b-Windows-Live-Platform.aspx#comment</wfw:comment>
      <wfw:commentRss>http://pietschsoft.com/syndication.axd?post=3314eabf-8818-450e-ad7d-27986a02f641</wfw:commentRss>
    </item>
  </channel>
</rss>
