<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brant Burnett&#039;s Development Blog</title>
	<atom:link href="http://btburnett.com/feed" rel="self" type="application/rss+xml" />
	<link>http://btburnett.com</link>
	<description></description>
	<lastBuildDate>Fri, 25 Mar 2011 13:39:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Correcting MVC 3 EditorFor Template Field Names When Using Collections</title>
		<link>http://btburnett.com/2011/03/correcting-mvc-3-editorfor-template-field-names-when-using-collections.html</link>
		<comments>http://btburnett.com/2011/03/correcting-mvc-3-editorfor-template-field-names-when-using-collections.html#comments</comments>
		<pubDate>Fri, 25 Mar 2011 13:39:35 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=163</guid>
		<description><![CDATA[So, I recently ran into a problem with ASP.NET MVC 3 and editor templates when dealing with models that contain collections. If you handle the collection directly in the view, it works fine: In the above example, the fields will receive the names &#8220;Locations[0].Name&#8221; and &#8220;Locations[0].Description&#8221;, and so on for each field. This is correct, [...]]]></description>
			<content:encoded><![CDATA[<p>So, I recently ran into a problem with ASP.NET MVC 3 and editor templates when dealing with models that contain collections.  If you handle the collection directly in the view, it works fine:</p>
<pre class="brush: vb; title: ; notranslate">
@For i as integer = 0 To Model.Locations.Count-1
    Dim index As Integer = i

    @&lt;div&gt;
        @Html.EditorFor(Function(model) model.Locations(i).Name)
        @Html.EditorFor(Function(model) model.Locations(i).Description)
    &lt;/div&gt;
Next
</pre>
<p>In the above example, the fields will receive the names &#8220;Locations[0].Name&#8221; and &#8220;Locations[0].Description&#8221;, and so on for each field.  This is correct, and will result in the model begin parsed correctly by the DefaultModelBinder if it&#8217;s a parameter on your POST action.</p>
<p>However, what if you want to make an editor template that always gets used for a specific collection type?  Let&#8217;s say, for example, that the collection in the model is of type LocationCollection, and you make an editor template named LocationCollection:</p>
<pre class="brush: vb; title: ; notranslate">
@ModelType LocationCollection
@For i as integer = 0 To Model.Count-1
    Dim index As Integer = i
    @&lt;div&gt;
        @Html.EditorFor(Function(model) model(i).Name)
        @Html.EditorFor(Function(model) model(i).Description)
    &lt;/div&gt;
Next
</pre>
<p>Then you reference it in your view like this:</p>
<pre class="brush: vb; title: ; notranslate">
@Model.EditorFor(Function(model) model.Locations)
</pre>
<p>In this case, the fields will actually have the incorrect names on them, the will be named &#8220;Locations.[0].Name&#8221; and &#8220;Locations.[0].Description&#8221;.  Notice the extra period before the array index specifier.  With these field names, the model binder won&#8217;t recognize the fields when they come back in the post.</p>
<p>The solution to this problem is a little cumbersome, due to the way the field names are built.  First, the prefix is passed down to the editor template in ViewData.TemplateInfo.HtmlFieldPrefix.  However, this prefix is passed down WITHOUT the period.  The period is added as a delimiter by the ViewData.TemplateInfo.GetFullHtmlFieldName function, which is used by all of the editor helpers, like Html.TextBox.</p>
<p>This means that we actually can&#8217;t fix it in the editor template shown above.  Instead, we need TWO editor templates.  The first one for LocationCollection, and then a second one for Location:</p>
<pre class="brush: vb; title: ; notranslate">
@ModelType LocationCollection
@For i as integer = 0 To Model.Count-1
    Dim index As Integer = i
    @Html.EditorFor(Function(model) model(index))
Next
</pre>
<pre class="brush: vb; title: ; notranslate">
@ModelType Location
@Code
    ViewData.TemplateInfo.FixCollectionPrefix()
End Code
&lt;div&gt;
    @Html.EditorFor(Function(model) model(i).Name)
    @Html.EditorFor(Function(model) model(i).Description)
&lt;/div&gt;
</pre>
<p>By breaking this up into two editor templates, we can now correct the prefix in the second template.  The first editor template receives an HtmlFieldPrefix of &#8220;Locations&#8221;, so we can&#8217;t do anything with that.  However, the Location editor template receives an HtmlFieldPrefix of &#8220;Locations.[0]&#8220;, so all we need to do is remove the extra period and the problem is solved.  As you can see in my example above, I&#8217;m calling a method on TemplateInfo, FixCollectionPrefix.  This is a simple extension method which corrects prefix, which you just need implement somewhere in an imported namespace:</p>
<pre class="brush: vb; title: ; notranslate">
&lt;Extension()&gt;
Public Sub FixCollectionPrefix(templateInfo As TemplateInfo)
Dim prefix As String = templateInfo.HtmlFieldPrefix
If Not String.IsNullOrEmpty(prefix) Then
templateInfo.HtmlFieldPrefix = Regex.Replace(prefix, &quot;.(\[\d+\])$&quot;, &quot;$1&quot;)
End If
End Sub
</pre>
<p>And that&#8217;s all there is to it.  I certainly hope that the MVC team fixes this problem internally for their next release, but until then we&#8217;ll just have to keep working around it.</p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2011/03/correcting-mvc-3-editorfor-template-field-names-when-using-collections.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MVC 3 Unobtrusive AJAX Improvements</title>
		<link>http://btburnett.com/2011/01/mvc-3-unobtrusive-ajax-improvements.html</link>
		<comments>http://btburnett.com/2011/01/mvc-3-unobtrusive-ajax-improvements.html#comments</comments>
		<pubDate>Fri, 28 Jan 2011 22:34:13 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=152</guid>
		<description><![CDATA[I started experimenting this week with MVC 3 and the new unobtrustive javascript frameworks, both for AJAX and validation. These are built around jQuery, and frankly are very nice pieces of work. There are, however, a few improvements that can be made to the Javascript files included in the distribution. You can obviously include these [...]]]></description>
			<content:encoded><![CDATA[<p>I started experimenting this week with MVC 3 and the new unobtrustive javascript frameworks, both for AJAX and validation.  These are built around jQuery, and frankly are very nice pieces of work.  There are, however, a few improvements that can be made to the Javascript files included in the distribution.  You can obviously include these changes manually, it&#8217;s pretty simple, but hopefully one day Microsoft will roll these up in the next version.</p>
<p>I&#8217;m not sure how the unobtrusive stuff is licensed by Microsoft, so I won&#8217;t publish the modified code here until I&#8217;m certain it&#8217;s okay.  I will, however, go over the modifications so that you can do them yourselves.</p>
<ol>
<li><strong>Use fn.delegate instead of fn.live &#8211; </strong>By default, the unobtrusive AJAX library uses fn.live to monitor for anchor click and form submit events, and if the elements are set to operate using AJAX they are intercepted and an AJAX request is initiated.  However, this can be inefficient because the selector is actually being fired during during document.ready, even though it isn&#8217;t used for anything.  This means every single form, submit button, and link on your page is being checked for a data-ajax=&#8221;true&#8221; attribute during document.ready for no reason.  By using $(document).delegate(<em>selector</em>, <em>eventType</em>, <em>fn</em>) this is completely avoided.  <em><strong>Note</strong>: This only works using jQuery 1.4.2 or later.</em></li>
<li><strong>Cache jQuery Objects</strong> &#8211; While this is a minor efficiency concern, there are several places with the event handlers where $(form) is called multiple times to convert an element into a jQuery object with a single member.  It is much more efficient to cache $(form) in a local variable and reuse it.  You can also make finding the form more efficient using .closest(&#8216;form&#8217;) instead of .parents(&#8216;form&#8217;)[0].</li>
<li><strong>Inefficient Handling Of Null Callbacks</strong> &#8211; asyncRequest uses getFunction to get a callback function based on data attributes.  This is nifty system, because can take either a function name or inline javascript code.  However, if there is no function specified, it goes through the trouble of using Function.constructor to create an empty function.  This can be avoided by adding &#8220;if (!code) return $.noop;&#8221; to the beginning of getFunction.</li>
<li><strong>Global AJAX Events</strong> &#8211; Currently, there is no way to attach global AJAX event handlers that specifically handle only the MVC related AJAX events.  Your only options are to intercept ALL jQuery AJAX events, or to attach events to each specific AJAX request using data attributes.  However, there are definitely use cases for global event handlers that only affect MVC related AJAX events.  Therefore, I recommend updating the &#8220;asyncRequest&#8221; function to add information to the options passed to $.ajax.  In particular, during the $.extend(options, {&#8230;}) I am adding &#8220;mvcRequest: true&#8221; and &#8220;mvcTargetElement: element&#8221;.  Now you can attach global jQuery AJAX handlers using $(document).ajaxSuccess, etc, and then test to see if it is an MVC request.</li>
<li><strong>AJAX Updated Forms Validation</strong> &#8211; In the current implementation of the unobtrusive validation, it can&#8217;t handle forms added to the page via an AJAX request.  You have to manually call $.validate.unobtrusive.parse() after the page update before client-side validation resumes.  This can be addressed using a global handler, so long as #3 above is also implemented.  By using the attributes passed in, we restrict the processing so it doesn&#8217;t re-parse the entire document, only the updated region.  The code for this is below:</li>
</ol>
<pre class="brush: jscript; title: ; notranslate">
$(document).ajaxSuccess(function (event, xhr, settings) {
    if (settings.mvcTargetElement) {
        $(settings.mvcTargetElement.getAttribute(&quot;data-ajax-update&quot;)).each(function () {
            $.validator.unobtrusive.parse(this);
        });
    }
});
</pre>
<p>Please let me know if you see any other improvements that I&#8217;ve missed.  I&#8217;m just beginning to dig through things, so I&#8217;ll keep updating as I find more as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2011/01/mvc-3-unobtrusive-ajax-improvements.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Smooth Animations In Firefox 4</title>
		<link>http://btburnett.com/2010/10/jquery-smooth-animations-in-firefox-4.html</link>
		<comments>http://btburnett.com/2010/10/jquery-smooth-animations-in-firefox-4.html#comments</comments>
		<pubDate>Sun, 24 Oct 2010 18:46:23 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=148</guid>
		<description><![CDATA[jQuery Smooth Animations is an experiment in utilizing the new, proposed animation API found in Firefox 4. It should be noted that this API is just a proposal and is experimental. Using it on live websites isn&#8217;t recommended until the API is finalized. jQuery Smooth Animations works by replacing parts of the standard jQuery API [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/btburnett3/jquery.smoothanim">jQuery Smooth Animations</a> is an experiment in utilizing the new, <a href="http://weblogs.mozillazine.org/roc/archives/2010/08/mozrequestanima.html">proposed animation API found in Firefox 4</a>.  It should be noted that this API is just a proposal and is experimental.  Using it on live websites isn&#8217;t recommended until the API is finalized.</p>
<p>jQuery Smooth Animations works by replacing parts of the standard jQuery API to make use of the new animation API if it is available.  It should still be fully compatible with browsers that don&#8217;t implement the animation API.</p>
<p>The end result of this plugin is that animations run more smoothly on Firefox 4, by syncing the animations with paint events.  In my experimental comparisons between Firefox 4 Beta 6 and Firefox 3.6.12, I noticed a significant improvement in the jerkiness of the animation in the example.</p>
<p>I recognize that this plugin could be slightly less invasive by not replacing any of the API if window.mozRequestAnimationFrame is not found.  However, I wanted to demonstrate how the code could function within the jQuery library itself rather than as a plugin.  This is based on the theory that at some point, once the API is standardized, support will be integrated into the jQuery library.</p>
<p>Integration into the library would also allow us to eliminate the override of jQuery.now, instead using smarter logic within jQuery.fx.step.  I simply didn&#8217;t want to replace jQuery.fx.step because of the extensive logic it contains which could be changed in future releases of jQuery.</p>
<p><a href="http://github.com/btburnett3/jquery.smoothanim">GitHub Repository</a></p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2010/10/jquery-smooth-animations-in-firefox-4.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting Original HTML5 Input Types On Unsupported Browsers</title>
		<link>http://btburnett.com/2010/04/detecting-html5-input-types-on-unsupported-browsers.html</link>
		<comments>http://btburnett.com/2010/04/detecting-html5-input-types-on-unsupported-browsers.html#comments</comments>
		<pubDate>Mon, 26 Apr 2010 03:24:43 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=132</guid>
		<description><![CDATA[I&#8217;ve been doing some work recently on extending jQuery UI to style form elements using the Themeroller.  One thing that I wanted to implement was detection of the new HTML5 input types and choosing the correct widget to use based upon that.  This would provide progressive enhancement of the input element to support the HTML5 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing some work recently on extending <a href="http://jqueryui.com/">jQuery UI</a> to style form elements using the <a href="http://jqueryui.com/themeroller/">Themeroller</a>.  One thing that I wanted to implement was detection of the new HTML5 input types and choosing the correct widget to use based upon that.  This would provide progressive enhancement of the input element to support the HTML5 input type, even if that type of input isn&#8217;t supported on that browser.</p>
<p>By definition, if a browser can&#8217;t support the type of an input, it automatically falls back to a text input.  This is great for backwards compatibility, but it gave me a bit of a problem.  If I set type=&#8221;number&#8221; in my HTML, testing the type of the element in Javascript returns &#8220;text&#8221; when the number element isn&#8217;t supported.  Useful for determining if support is available, not so useful for determining what the original value is in the HTML.</p>
<p>In most browsers, you can find the original value using the attributes collection.  However, this doesn&#8217;t work in IE7 and earlier.  And, as everyone knows, we still have to support IE 6 &amp; 7 for most web sites.  I found an alternative for IE, which is to test the outerHTML of the element using a regular expression.  IE will return this with the original attributes intact.</p>
<p>I&#8217;ve written a jQuery filter extension that allows you to test any element for the original input type:</p>
<pre class="brush: jscript; title: ; notranslate">
// add HTML5 input type expression (still detects HTML5 input types on browsers that don't support them)
$.extend($.expr[':'], {
	inputtype: function(elem, i, type) {
		function getRawAttr() {
			// IE will return the original value in the outerHTML
			var match = /&lt;input.*?\s+type=(\w+)(\s+|&gt;).*?/i.exec(elem.outerHTML);

			if (match &amp;&amp; match.length &gt;= 2 &amp;&amp; match[1] !== &quot;text&quot;) {
				return match[1];
			}

			// for other browsers, test attributes collection (doesn't work in IE&lt;7)
			var attrs = elem.attributes,
				i;

			for (i=0; i&lt;attrs.length; i++) {
				if (attrs[i].nodeName === &quot;type&quot;) {
					return attrs[i].nodeValue;
				}
			}

		}

		if (elem.tagName != &quot;INPUT&quot;) return false;
		if (elem.type === &quot;text&quot;) {
			// could be unsupported type fallback, so do further testing
			return getRawAttr() === type[3];
		} else {
			return elem.type === type[3];
		}
	}
});
</pre>
<p>To use this extension, just use the :inputtype(type) filter in your jQuery expression.  For example:</p>
<pre class="brush: jscript; title: ; notranslate">

$('input:inputtype(number)).width(100);

if ($(elem).is(':inputtype(number)')) {
...
}
</pre>
<p><strong>Update:</strong> Changed to only run the check if the tag is an input tag, in case you run the filter against non-input elements.</p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2010/04/detecting-html5-input-types-on-unsupported-browsers.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simplify CSS and Javascript Compression In Visual Studio</title>
		<link>http://btburnett.com/2010/02/simplify-css-and-javascript-compression-in-visual-studio.html</link>
		<comments>http://btburnett.com/2010/02/simplify-css-and-javascript-compression-in-visual-studio.html#comments</comments>
		<pubDate>Tue, 23 Feb 2010 18:35:26 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=127</guid>
		<description><![CDATA[I&#8217;ve released a new open source tool that performs design-time compression of your CSS and Javascript files in Visual Studio projects.  This can be a big help, since it allows you to easily do it in your project rather than as part of your build/publish process.  And, since it leaves both the compressed and uncompressed [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve released a new open source tool that performs design-time compression of your CSS and Javascript files in Visual Studio projects.  This can be a big help, since it allows you to easily do it in your project rather than as part of your build/publish process.  And, since it leaves both the compressed and uncompressed versions in place, you can still use the uncompressed version for debugging.</p>
<p>Read more about this new tool or download it at <a href="http://btburnett.com/netcompressor">http://btburnett.com/netcompressor</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2010/02/simplify-css-and-javascript-compression-in-visual-studio.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery.themescript 1.1.0 Released</title>
		<link>http://btburnett.com/2010/02/jquery-themescript-1-1-0-released.html</link>
		<comments>http://btburnett.com/2010/02/jquery-themescript-1-1-0-released.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 22:51:39 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=112</guid>
		<description><![CDATA[Today I&#8217;ve released version 1.1.0 of jQuery.themescript.  This release includes some significant improvements that make it far more functional in the real world. The original design concept was for a web store framework I was working on.  I wanted each store be able to easily change their javascript based themes without making changes to the [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve released version 1.1.0 of jQuery.themescript.  This release includes some significant improvements that make it far more functional in the real world.</p>
<p>The original design concept was for a web store framework I was working on.  I wanted each store be able to easily change their javascript based themes without making changes to the javascript files for the basic theme.  This made for a much easier file based deployment of new versions to each store.  The obvious downside is that you&#8217;re downloading lots of extra javascript, particularly if you&#8217;re turning features back off that were in the basic theme.  This type of functionality is only useful in certain cases, and is never the most efficient system possible with regards to performance and bandwidth, just maintainability.</p>
<p>This new release still maintains that basic functionality, but now I address a more common concern as well, applying themes to AJAX updates.  In order to support this, I&#8217;ve added several new features.</p>
<ul>
<li>$.themescript.exec now accepts a context parameter.  This can be a jQuery object or an HTML DOM element, just like the context to jQuery&#8217;s <a href="http://api.jquery.com/jQuery/">jQuery(selector, [context])</a> selector function.  All registered functions will receive this context as a parameter, and it will be automatically used as the context to selector-based theming to restrict the elements returned.</li>
</ul>
<ul>
<li>themescript is a new function added to jQuery objects which allows you to execute the themescripts against a specific jQuery object.  $(&#8216;#selector&#8217;).themescript() is equivalent to $.themescript.exec( $(&#8216;#selector&#8217;) )</li>
</ul>
<ul>
<li>themescript( url, [data], [callback] ) works just like the jQuery <a href="http://api.jquery.com/load/">load</a> method, except that it will automatically run themescripts against the updated HTML if the request is successful.</li>
</ul>
<p>You can also easily add support for jQuery.themescript to ASP.Net AJAX partial page updates (a.k.a. UpdatePanels).  Just add this script code to your files and the themescripts will be automatically executed against any UpdatePanels which are changed during an asynchronous postback.</p>
<pre class="brush: jscript; title: ; notranslate">
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_pageLoaded(function(sender, args) {
    var&lt;/span&gt; updated = args.get_panelsUpdated();
    if&lt;/span&gt; (updated &amp;&amp; updated.length) {
        $.themescript.exec($(updated));
    }
});
</pre>
<p>Here are the links where you can access the GitHub repository or download the files:</p>
<p><a href="http://github.com/btburnett3/jquery.themescript">GitHub</a><br />
<a href="http://github.com/btburnett3/jquery.themescript/zipball/1.1.0">Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2010/02/jquery-themescript-1-1-0-released.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LABjs.Net Release Candidate 1.0rc4</title>
		<link>http://btburnett.com/2010/02/labjs-net-release-candidate-1-0rc4.html</link>
		<comments>http://btburnett.com/2010/02/labjs-net-release-candidate-1-0rc4.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 15:18:27 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=109</guid>
		<description><![CDATA[I&#8217;ve committed release candidate 4 of LABjs.Net at GitHub.  It contains a few minor bug fixes, and also adds a few useful features. LabScriptCombine allows you to make use of the automated runtime script combining features of ASP.Net 3.5 in combination with LABjs script chaining.  To get the optimum script load time, combine scripts between [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve committed release candidate 4 of LABjs.Net at GitHub.  It contains a few minor bug fixes, and also adds a few useful features.</p>
<ul>
<li>LabScriptCombine allows you to make use of the automated runtime script combining features of ASP.Net 3.5 in combination with LABjs script chaining.  To get the optimum script load time, combine scripts between each wait() call into a single HTTP request, so long as you are consistently using that combination of scripts across your pages.</li>
<li>Added some useful constructors to several of the LABjs.Net classes.  These constructors make it easier to build a LABjs chain in your code rather than in your .aspx files.</li>
<li>Made a slight change to the LabWait constructor that accepts an inlineScript parameter.  It will now default DetectScriptTags to False if you use this constructor, since you shouldn&#8217;t be including the script tags if you are building your chain in code.  You can still set this Property back to True if needed.</li>
<li>Added AlternateRef property to LabScriptReference.  If you&#8217;re using the experimental CDN failover extension to LABjs, it allows you to specify a full set of options for the alternate script.  The AlternateRef property allows you to make use of those options if you want to, by providing a full LabScriptReference class to use.  This is optionally used instead of the simpler Alternate property that just provides a URL.</li>
</ul>
<p><a href="http://cloud.github.com/downloads/btburnett3/LABjs.Net/LABjs.Net-1.0rc4.zip" target="_blank">Binaries<br />
</a><a href="http://github.com/btburnett3/LABjs.Net">GitHub</a></p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2010/02/labjs-net-release-candidate-1-0rc4.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simplify Asynchronous Javascript Loading In ASP.Net Using LABjs</title>
		<link>http://btburnett.com/2010/01/simplify-asynchronous-javascript-loading-in-asp-net.html</link>
		<comments>http://btburnett.com/2010/01/simplify-asynchronous-javascript-loading-in-asp-net.html#comments</comments>
		<pubDate>Wed, 27 Jan 2010 21:41:48 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=100</guid>
		<description><![CDATA[LABjs is an excellent javascript library that performs asynchronous loading of javascript files. This can help to greatly increase the load speed of your web pages. Now, instead of blocking while one file is being downloaded, other scripts further down the chain can be downloaded while waiting. On top of that, it can maintain processing [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://labjs.com">LABjs</a> is an excellent javascript library that performs asynchronous loading of javascript files.  This can help to greatly increase the load speed of your web pages.  Now, instead of blocking while one file is being downloaded, other scripts further down the chain can be downloaded while waiting.  On top of that, it can maintain processing order, waiting to process certain scripts until others are complete, and optionally executing code on completion.</p>
<p>All of this is great for the client side.  But how do you define which scripts to include in the LABjs chain on the server side?</p>
<p>Since for work I primarily operate in ASP.Net, I&#8217;ve created an ASP.Net solution to the problem, LABjs.Net.  This library provides two key controls, LabScriptManager and LabScriptManagerProxy.  These controls loosely follow the behavior of the AJAX ScriptManager and ScriptManagerProxy controls, at least their script loading aspects.</p>
<p>Key supported features include:</p>
<ol>
<li>Refer to script files using application relative paths (i.e. ~/js/jquery.min.js)</li>
<li>Load script files from assembly resources</li>
<li>Specify if debug or release scripts should be used, or use the debug setting from the web.config file</li>
<li>Ability to set any of the options provided by LABjs</li>
<li>Include wait() calls in the chain, and provide inline functions to be executed after the wait</li>
<li>Use LabScriptManagerProxy to add scripts and waits to the chain in content pages and user controls</li>
<li>Use LabActionGroup inside LabScriptManagerProxy to add script() calls at a specific point in the primary chain</li>
<li>LABjs debug and release versions are embedded in the DLL and automatically referenced, but you can opti0nally override this with your own URL</li>
<li>Experimental support for the cdnLABjs library I am working on, which provides automatic failover to a local file if a file fails to load from a CDN (for information about why, see <a href="http://bit.ly/8YKQ2f">Using CDN Hosted jQuery with a Local Fall-back Copy</a>)</li>
</ol>
<p>Below you will find links to the current release candidate, 1.0rc1.  Please review it and give me any feedback you might have.</p>
<p><a href="http://cloud.github.com/downloads/btburnett3/LABjs.Net/LABjs.Net-1.0rc3.zip">Download Binaries</a><br />
<a href="http://github.com/btburnett3/LABjs.Net/raw/master/README">Readme File</a><br />
<a href="http://github.com/btburnett3/LABjs.Net">Git Repository</a></p>
<p><strong>Update 2/8/2010:</strong> <a href="http://btburnett.com/2010/02/labjs-net-release-candidate-1-0rc4.html">Updated to version 1.0rc4</a></p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2010/01/simplify-asynchronous-javascript-loading-in-asp-net.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery UI Spinner Widget 1.10</title>
		<link>http://btburnett.com/2009/05/jquery-ui-spinner-widget-110.html</link>
		<comments>http://btburnett.com/2009/05/jquery-ui-spinner-widget-110.html#comments</comments>
		<pubDate>Thu, 14 May 2009 02:47:56 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=98</guid>
		<description><![CDATA[I&#8217;ve uploaded a revised jQuery UI Spinner widget, version 1.10, based upon a lot of excellent feedback from the jQuery UI team. New features include mousewheel scrolling, decimal support, customizable prefixes/suffixes for currency/percents, improved input masking and maxlength handling, HTML5 markup support, lots of bug fixes, and more. jquery.ui.spinner Git Repository jQuery UI Spinner Widget [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve uploaded a revised jQuery UI Spinner widget, version 1.10, based upon a lot of excellent feedback from the jQuery UI team.  New features include mousewheel scrolling, decimal support, customizable prefixes/suffixes for currency/percents, improved input masking and maxlength handling, HTML5 markup support, lots of bug fixes, and more.</p>
<p><a href="http://github.com/btburnett3/jquery.ui.spinner">jquery.ui.spinner Git Repository</a><br />
<a href="/spinner/example/example.html">jQuery UI Spinner Widget Example</a></p>
<p>As it turns out, the jQuery UI team already had a spinner widget sitting in their files that hadn&#8217;t been worked on in a while, so I&#8217;m working with Ca-Phun Ung to see if we can finish getting it up-to-date, polished, and with some of the new features from my widget incorporated into it.  Stay tuned for more info.</p>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2009/05/jquery-ui-spinner-widget-110.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create A Self-Signed SSL Certificate In .NET</title>
		<link>http://btburnett.com/2009/05/create-a-self-signed-ssl-certificate-in-net.html</link>
		<comments>http://btburnett.com/2009/05/create-a-self-signed-ssl-certificate-in-net.html#comments</comments>
		<pubDate>Fri, 08 May 2009 13:50:43 +0000</pubDate>
		<dc:creator>Brant Burnett</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://btburnett.com/?p=95</guid>
		<description><![CDATA[A problem that I have commonly run into is trying to secure communications using SSL or other encryption for a intranet application. In this scenario, it is unnecessary to have a secure certificate signed by an expensive Internet authority. And often it is intended for deployment in a small-scale scenario where there might not be [...]]]></description>
			<content:encoded><![CDATA[<p>A problem that I have commonly run into is trying to secure communications using SSL or other encryption for a intranet application.  In this scenario, it is unnecessary to have a secure certificate signed by an expensive Internet authority.  And often it is intended for deployment in a small-scale scenario where there might not be a Certification Authority running on a Window Server.  In this case, you want to create a self-signed certificate and use the thumbprint of the certificate for phishing prevention.</p>
<p>Microsoft does provide a utility, makecert, which can create a self-signed certificate.  However, it isn&#8217;t distributed with Windows, is command line only, and definately NOT end user friendly.  I wanted a method for creating a certificate just by clicking a button, without using a shell calls and distributing a copy of makecert with my applications.</p>
<p>To this end, I created a VB.Net class that calls out to the CryptoAPI and creates a self signed certificate with a 2048-bit RSA key.  The certificate and private key are stored in the Local Machine store.  In the Local Machine store it can be accessed by system processes and services.  I&#8217;ve attached an example of the class to this post, feel free to use it as you see fit.</p>
<a class="downloadlink" href="http://btburnett.com/wp-content/plugins/download-monitor/download.php?id=5" title=" downloaded 791 times" >Certificate Creator (791)</a>
]]></content:encoded>
			<wfw:commentRss>http://btburnett.com/2009/05/create-a-self-signed-ssl-certificate-in-net.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

