<?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>shepherdweb.com &#187; Atlas</title>
	<atom:link href="http://shepherdweb.com/category/web-code/aspnet/atlas/feed/" rel="self" type="application/rss+xml" />
	<link>http://shepherdweb.com</link>
	<description>Shane Shepherd: web design and development; music</description>
	<lastBuildDate>Wed, 11 Nov 2009 01:46:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Microsoft &#8220;Atlas&#8221; Overview &#8211; Lubbock .NET Users Group Presentation</title>
		<link>http://shepherdweb.com/2006/09/20/microsoft-atlas-overview-lubbock-net-users-group-presentation/</link>
		<comments>http://shepherdweb.com/2006/09/20/microsoft-atlas-overview-lubbock-net-users-group-presentation/#comments</comments>
		<pubDate>Thu, 21 Sep 2006 02:17:44 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Atlas]]></category>
		<category><![CDATA[LDNUG]]></category>

		<guid isPermaLink="false">http://www.shepherdweb.com/2006/09/20/microsoft-atlas-overview-lubbock-net-users-group-presentation/</guid>
		<description><![CDATA[I&#8217;ve posted the slides and demos for my recent presentation on the technology formerly known as &#8220;Atlas&#8221; (it is now known as the Microsoft AJAX Library, ASP.NET 2.0 AJAX Extensions, and ASP.NET AJAX Control Toolkit). I&#8217;ve haven&#8217;t been able to get my connection to the SQL 2005 Express .mdf file to work yet, so not [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve posted the <a href="http://www.shepherdweb.com/lab/2006/LDNUG-Atlas/">slides</a> and <a href="http://www.shepherdweb.info/">demos</a> for my recent presentation on the technology formerly known as &#8220;Atlas&#8221; (it is now known as the Microsoft AJAX Library, ASP.NET 2.0 AJAX Extensions, and ASP.NET AJAX Control Toolkit).  I&#8217;ve haven&#8217;t been able to get my connection to the SQL 2005 Express .mdf file to work <em>yet</em>, so not all of the demos are working.  Hopefully I&#8217;ll be able to get them running this weekend.  The demos that don&#8217;t depend on the SQL connection are fully functional though.  Also, the source code for the project is available for download as a zip, or viewable in individual text files.  You will have to navigate through the slides in order to get to the links though.  Please post if you have questions or problems with any of the code or demos.</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http://www.shepherdweb.com/2006/09/20/microsoft-atlas-overview-lubbock-net-users-group-presentation/"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.shepherdweb.com/2006/09/20/microsoft-atlas-overview-lubbock-net-users-group-presentation/" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<div class="techtags"><p>Technorati Tags: <a href="http://technorati.com/tag/speaking" rel="tag">speaking</a>, <a href="http://technorati.com/tag/Atlas" rel="tag"> Atlas</a>, <a href="http://technorati.com/tag/ASP.NET" rel="tag"> ASP.NET</a>, <a href="http://technorati.com/tag/LDNUG" rel="tag"> LDNUG</a>, <a href="http://technorati.com/tag/AJAX" rel="tag"> AJAX</a></p></div>
]]></content:encoded>
			<wfw:commentRss>http://shepherdweb.com/2006/09/20/microsoft-atlas-overview-lubbock-net-users-group-presentation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>September LDNUG</title>
		<link>http://shepherdweb.com/2006/09/15/september-ldnug/</link>
		<comments>http://shepherdweb.com/2006/09/15/september-ldnug/#comments</comments>
		<pubDate>Fri, 15 Sep 2006 15:18:52 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Atlas]]></category>
		<category><![CDATA[LDNUG]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.shepherdweb.com/2006/09/15/september-ldnug/</guid>
		<description><![CDATA[Free pizza, soft drinks and .NET! It&#8217;s not Geek Meet, but it&#8217;s close! All we need now is a our own Flickr photo group. (Eat your heart out Rob) This month&#8217;s LDNUG meeting will take place on September 19th at 7pm at 5808 4th St. (INCODE) &#8211; Lubbock, TX. I will be presenting. The talk [...]]]></description>
			<content:encoded><![CDATA[<p>Free pizza, soft drinks and .NET!  It&#8217;s not <a href="http://robertnyman.com/geekmeet">Geek Meet</a>, but it&#8217;s close!  All we need now is a our own <a href="http://www.flickr.com/">Flickr</a> <a href="http://www.flickr.com/groups/sthlmgeekmeet/">photo group</a>. (Eat your heart out <a href="http://www.robertnyman.com/">Rob</a>)</p>
<div class="vevent">
This month&#8217;s <a class="url" href="http://www.ldnug.net/default.aspx?section=home&#038;id=7"><span class="summary"><acronym title="Lubbock .NET User's Group">LDNUG</acronym> meeting</span></a> will take place on <abbr class="dtstart" title="20060919T1900-0600">September 19th at 7pm</abbr> at <span class="location">5808 4th St. (INCODE) &#8211; Lubbock, TX</span>.  <span class="description">I will be presenting.  The talk will cover the ASP.NET &#8220;Atlas&#8221; Framework and the ASP.NET &#8220;Atlas&#8221; Control Toolkit.  I plan to post the slides, sample code, and demos following the presentation.  If you have a particular control you would like to see highlighted, let me know since I most likely will not have time to cover every single one.</span>
</div>
<div class="techtags"><p>Technorati Tags: <a href="http://technorati.com/tag/speaking" rel="tag">speaking</a>, <a href="http://technorati.com/tag/LDNUG" rel="tag"> LDNUG</a>, <a href="http://technorati.com/tag/Atlas" rel="tag"> Atlas</a>, <a href="http://technorati.com/tag/ASP.NET" rel="tag"> ASP.NET</a>, <a href="http://technorati.com/tag/Geek+Meet" rel="tag"> Geek Meet</a></p></div>
]]></content:encoded>
			<wfw:commentRss>http://shepherdweb.com/2006/09/15/september-ldnug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building and Implementing a Custom Atlas Extender with Visual Studio 2005</title>
		<link>http://shepherdweb.com/2006/08/24/building-and-implementing-a-custom-atlas-extender-with-visual-studio-2005/</link>
		<comments>http://shepherdweb.com/2006/08/24/building-and-implementing-a-custom-atlas-extender-with-visual-studio-2005/#comments</comments>
		<pubDate>Fri, 25 Aug 2006 01:15:38 +0000</pubDate>
		<dc:creator>Shane</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Atlas]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[technology & web]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.shepherdweb.com/2006/08/24/building-and-implementing-a-custom-atlas-extender-with-visual-studio-2005/</guid>
		<description><![CDATA[Pre-requisites: Atlas Framework Atlas Control Toolkit Summary The Atlas Control Toolkit site does a good job a walking through all the steps necessary to build a custom extender. You&#8217;ll want to refer to that site for more general detail. I&#8217;m going to show you my own custom implementation. I needed a control that would sum [...]]]></description>
			<content:encoded><![CDATA[<h2>Pre-requisites:</h2>
<ol>
<li><a href="http://atlas.asp.net/">Atlas Framework</a></li>
<li><a href="http://atlas.asp.net/default.aspx?tabid=47&#038;subtabid=477">Atlas Control Toolkit</a></li>
</ol>
<h2>Summary</h2>
<p>The Atlas Control Toolkit site does a good job a walking through all the steps necessary to build a <a href="http://atlas.asp.net/atlastoolkit/Walkthrough/CreatingNewExtender.aspx">custom extender</a>.  You&#8217;ll want to refer to that site for more general detail.  I&#8217;m going to show you my own custom implementation.</p>
<p>I needed a control that would sum all the TextBoxes on a page, using the <code>onchange</code> event, and display the answer in another TextBox.  For my purposes, the input is limited to integers, but it could easily be adapted to handle other numeric input.  I call my Atlas extender &#8220;SumTextboxes&#8221;.</p>
<h2>Getting Started</h2>
<p>Create a new project.  You can do this one of three ways:</p>
<ul>
<li>Go to <em>File->New Project&#8230;</em>;</li>
<li><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>N</kbd>;</li>
<li>Right Click on a solution that is already open and select <em>Add->New Project&#8230;</em></li>
</ul>
<p><img src="/images/posts/20060824_AtlasTutorial/AddNewProject.jpg" width="550" height="333" alt="Add New Project Window"  /></p>
<p>All three methods will open up the <strong>Add New Project</strong> dialog.  Select your language preference (<acronym title="Visual Basic">VB</acronym> or C#) the <strong>&#8220;Atlas&#8221; Control Project</strong>.  The Atlas Control Project does not exist for any other languages right now.  Give your project a name and specify the location.</p>
<p><img src="/images/posts/20060824_AtlasTutorial/AddNewItem.jpg" width="550" height="315" alt="Add New Item Window"  /></p>
<p>Next, right click on your new project and select <em>Add->New Item&#8230;</em>.  This will open the <strong>Add New Item</strong> dialog.  Choose the <strong>&#8220;Atlas&#8221; Extender Control</strong> template, give it a name, and click <em>Add</em>.  Four files appear in your project.  These are the base files needed to build a custom extender.</p>
<p><img src="/images/posts/20060824_AtlasTutorial/NewItemFiles.jpg" width="254" height="153" alt="Atlas Extender Template Files"  /></p>
<h2>Write the Code</h2>
<p>Open all four of the template files and make the following changes:</p>
<dl>
<dt>SumTextboxesDesigner.cs</dt>
<dd>Change the word <code>Control</code> to the more specific <code>TextBox</code>.</dd>
<dt>SumTextboxesExtender.cs</dt>
<dd>Same thing: Change the word <code>Control</code> to the more specific <code>TextBox</code>.</dd>
<dt>SumTextboxesProperties.cs</dt>
<dd>Looks like this:<br />
<code class="block"><br />
    [DefaultProperty("TargetResultTextBoxID")]<br />
    public class SumTextboxesProperties : TargetControlPropertiesBase&lt;TextBox&gt;<br />
    {<br />
        // TODO: Add your property accessors here.<br />
        //<br />
        [IDReferenceProperty(typeof(TextBox))]<br />
        public string TargetResultTextBoxID<br />
        {<br />
            get<br />
            {<br />
                return GetPropertyStringValue("TargetResultTextBoxID");<br />
            }<br />
            set<br />
            {<br />
                SetPropertyStringValue("TargetResultTextBoxID", value);<br />
            }<br />
        }<br />
    }<br />
</code></p>
</dd>
<dt>SumTextboxesBehavior.js</dt>
<dd>First, initialize your property variable: <code>var _TargetResultTextBoxIDValue;</code>.  You can delete the <code>this._onkeyup</code> function; create a new function called <code>this._onchange</code>&#8230;we&#8217;ll get to the code for _onchange in a second.  Change the initialize function to look like this:<br />
<code class="block"><br />
    this.initialize = function() {<br />
        SumTextboxes.SumTextboxesBehavior.callBaseMethod(this, 'initialize');<br />
        // TODO: add your initalization code here<br />
        this.control.element.attachEvent('onchange', Function.createDelegate(this, this._onchange));<br />
        this._onchange();<br />
    }<br />
</code></p>
<p>You will also need to change the code inside <code>this.getDescriptor</code> to this:<br />
<code class="block">td.addProperty('TargetResultTextBoxID', String);</code></p>
<p>&#8230;and your property accessors:<br />
<code class="block"><br />
    // These are helper functions for communicating state back to the extender on the<br />
    // server side.  They take or return a custom string that is available in your initialize method<br />
    // and later.<br />
    //<br />
    this.getClientState = function() {<br />
        var value = SumTextboxes.SumTextboxesBehavior.callBaseMethod(this, 'get_ClientState');<br />
        if (value == '') value = null;<br />
        return value;<br />
    }<br />
  //<br />
    this.setClientState = function(value) {<br />
        return SumTextboxes.SumTextboxesBehavior.callBaseMethod(this, 'set_ClientState',[value]);<br />
    }<br />
</code></p>
<p>And finally, back to <code>this._onchange</code>.  This is where the meat of this extender is:<br />
<code class="block"><br />
    this._onchange = function() {<br />
        if (!document.getElementsByTagName)<br />
        {<br />
            return;<br />
        }<br />
        var e = document.getElementById(_TargetResultTextBoxIDValue);<br />
        var total = 0;<br />
        oTextboxes = new Array();<br />
        oInputs = document.getElementsByTagName('input');<br />
        for (i=0;i<oInputs.length;i++)<br />
        {<br />
            if (oInputs[i].type == 'text')<br />
            {<br />
                oTextboxes.push(oInputs[i]);<br />
            }<br />
        }<br />
        var msg = "Found " + oTextboxes.length + " text boxes";<br />
        for (i=0;i<oTextboxes.length;i++)<br />
        {<br />
            if (!isNaN(parseInt(oTextboxes[i].value)) &#038;&#038; oTextboxes[i] != e)<br />
            {<br />
                total += parseInt(oTextboxes[i].value);<br />
            }<br />
        }<br />
        e.value = total;<br />
    }<br />
</code> </p>
</dd>
</dl>
<p>You're almost done!  Save the project and build.  You can now use this extender in an ASP.NET website!  </p>
<h2>Implementation</h2>
<p><img src="/images/posts/20060824_AtlasTutorial/AddReference.jpg" width="481" height="392" alt="Add Reference Window"  /></p>
<p>Add a reference to SumTextboxes in the project by right clicking on the project and selection <em>Add Reference...</em>.  This will open the <strong>Add Reference</strong> dialog.  Select the <em>Projects</em> tab, the <em>SumTextboxes</em> project, and click OK.</p>
<p><img src="/images/posts/20060824_AtlasTutorial/Toolbar-ScriptManagerControl.jpg" width="192" height="280" alt="Toolbar - Atlas Script Manager Control"  /></p>
<p>Drag a ScriptManager control from your toolbar onto the design view.  This is control is required for Atlas enabled applications.</p>
<p><img src="/images/posts/20060824_AtlasTutorial/TextboxesScreenshot.jpg" width="360" height="240" alt="Textboxes Screenshot"  /></p>
<p>Add some TextBoxes to your page.  For each TextBox, you will also need a SumTextboxes control.  I chose to use another Atlas Extender, the <a href="http://atlas.asp.net/atlastoolkit/FilteredTextBox/FilteredTextBox.aspx">FilteredTextBoxExtender</a> to restrict the user input to numbers.  Here's a snippet of my code for each textbox:<br />
<code class="block"><br />
&lt;asp:Label ID=&quot;lblHundreds&quot; runat=&quot;server&quot; AssociatedControlID=&quot;txtHundreds&quot;&gt;Hundreds (100s):&lt;/asp:Label&gt;<br />
            &lt;cc2:FilteredTextBoxExtender ID=&quot;FilteredTextBoxExtender1&quot; runat=&quot;server&quot;&gt;<br />
                &lt;cc2:FilteredTextBoxProperties TargetControlID=&quot;txtHundreds&quot; FilterType=&quot;numbers&quot; /&gt;<br />
            &lt;/cc2:FilteredTextBoxExtender&gt;<br />
            &lt;cc3:SumTextboxesExtender ID=&quot;SumTextboxesExtender1&quot; runat=&quot;server&quot;&gt;<br />
                &lt;cc3:SumTextboxesProperties<br />
                    TargetControlID=&quot;txtHundreds&quot;<br />
                    TargetResultTextBoxID=&quot;txtTotal&quot; /&gt;<br />
            &lt;/cc3:SumTextboxesExtender&gt;<br />
            $&lt;asp:TextBox ID=&quot;txtHundreds&quot; runat=&quot;server&quot; Text=&quot;0&quot; /&gt;.00<br />
</code></p>
<p>Notice that the TargetResultTextBoxID property has been set to "txtTotal".  txtTotal is the TextBox control at the bottom of the page where the results are displayed.  It is updated everytime the user tabs off a field that has the SumTextboxes control attached to it! </p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http://www.shepherdweb.com/2006/08/24/building-and-implementing-a-custom-atlas-extender-with-visual-studio-2005/"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://www.shepherdweb.com/2006/08/24/building-and-implementing-a-custom-atlas-extender-with-visual-studio-2005/" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<div class="techtags"><p>Technorati Tags: <a href="http://technorati.com/tag/atlas" rel="tag">atlas</a>, <a href="http://technorati.com/tag/atlas.net" rel="tag"> atlas.net</a>, <a href="http://technorati.com/tag/asp.net" rel="tag"> asp.net</a>, <a href="http://technorati.com/tag/visual+studio" rel="tag"> visual studio</a>, <a href="http://technorati.com/tag/atlas+extender" rel="tag"> atlas extender</a></p></div>
]]></content:encoded>
			<wfw:commentRss>http://shepherdweb.com/2006/08/24/building-and-implementing-a-custom-atlas-extender-with-visual-studio-2005/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

