<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"><channel><title>[How Do I:] Create an ASP.NET AJAX Extender from Scratch?</title><link>http://www.asp.net</link><pubDate>Sun, 09 Aug 2009 22:09:07 GMT</pubDate><generator>umbraco</generator><description>Comments for [How Do I:] Create an ASP.NET AJAX Extender from Scratch?</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/33627" rel="self" type="application/rss+xml" /><item><title>Comment Posted by jpeterson77</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Fri, 25 Apr 2008 15:20:19 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001754</guid><description><![CDATA[ <p>Hi,</p> <p>Great tutorial but I am getting an error on compilation. &#160;In the bottom left corner of the browser it says &quot;error on page&quot; in the details section it says &quot;DisabledButton is undefined at line 60&quot;. &#160;This is in the $create command. &#160;Any idea why this might be happening? &#160;any help would be much appreciated.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/jpeterson77.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by cv_vikram</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Thu, 07 Aug 2008 15:58:08 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001755</guid><description><![CDATA[ <p>Very good tutorial..thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/cv_vikram.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by mosaguitar</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Sat, 01 Nov 2008 00:40:59 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001757</guid><description><![CDATA[ <p>HI,</p> <p>it is realy helpful tutorial ,but i have problem with the method return GetPropertyValue(&quot;TargetButtonID&quot;, &quot;&quot;);</p> <p>the errer messsage is </p> <p>the name GetPropertyValue does not exist in the current context</p> <p>can any body help in that .</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/mosaguitar.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by hareshambaliya</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Mon, 17 Nov 2008 09:24:12 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001758</guid><description><![CDATA[ <p>Hi,</p> <p>Great video, I am interested in more videos of extender. can you please send more detail on ajax extender.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/hareshambaliya.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by sankarcganesh</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Mon, 08 Dec 2008 04:49:14 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001759</guid><description><![CDATA[ <p>any one can help me that i am a new to javascript .any body teach me</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/sankarcganesh.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Danny117</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Tue, 16 Dec 2008 11:42:03 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001760</guid><description><![CDATA[ <p>After watching this video everything just started to click.</p> <p>Thanks</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/Danny117.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Dollarjunkie</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Tue, 03 Feb 2009 10:31:56 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001761</guid><description><![CDATA[ <p>Hi Chris, </p> <p>I do hope I get answers to my Question here as I am cluesless as to what it is I have not been doing right here. I have watched this particular video at least 5 times and I still can not seem to get my own AJAX extender control to work as I expect it to. I have posted this same on the forum and still no responses so I figure, I might try to ask you directly. </p> <p>I am a newbie to Javascript. I have an extender control that is supposed to work with a FileUpload and an Image control. What I want to happen is when a file is selected for upload, at the firing of the OnChange event, what my code is meant to do is show the image that is selected for upload. Problem is nothing seems to be happening. Below is the jScript I have, I followed your example above to create a server class for the wiring of behaviors. Problem is I do not know what else to tweak to get this working. Can you please help? </p> <p>/// &lt;reference name=&quot;MicrosoftAjax.js&quot;/&gt;</p> <p>Type.registerNamespace(&quot;Ajax.UserControls&quot;);</p> <p>Ajax.UserControls.ImagePreview = function(element) {</p> <p>//initialize the base</p> <p>Ajax.UserControls.ImagePreview.initializeBase(this, [element]);</p> <p>// Initialize instance level fields</p> <p>this._defaultimage = null;</p> <p>this._previewimage = null;</p> <p>this._targetimageid = null;</p> <p>}</p> <p>Ajax.UserControls.ImagePreview.prototype =</p> <p>{</p> <p> &#160; &#160;//call initialize on this first </p> <p> &#160; &#160;initialize: function() {</p> <p> &#160; &#160; &#160; &#160;Ajax.UserControls.ImagePreview.callBaseMethod(this, &#39;initialize&#39;);</p> <p> &#160; &#160; &#160; &#160;// Get a reference to the associated element</p> <p> &#160; &#160; &#160; &#160;var fileuploadcontrol = this.get_element();</p> <p> &#160; &#160; &#160; &#160;// Wire up handler for onmouseover </p> <p> &#160; &#160; &#160; &#160;var delegate = Function.createDelegate(this, this._onChange);</p> <p> &#160; &#160; &#160; &#160;$addHandler(fileuploadcontrol, &#39;change&#39;, delegate);</p> <p> &#160; &#160; &#160; &#160;this._onChange();</p> <p> &#160; &#160;}, //end initialize</p> <p> &#160; &#160;dispose: function() {</p> <p> &#160; &#160; &#160; &#160;//Add custom dispose actions here</p> <p> &#160; &#160; &#160; &#160;Ajax.UserControls.ImagePreview.callBaseMethod(this, &#39;dispose&#39;);</p> <p> &#160; &#160;}, //end dispose</p> <p> &#160; &#160;//Properties </p> <p> &#160; &#160;get_DefaultImage: function() {</p> <p> &#160; &#160; &#160; &#160;return this._defaultimage;</p> <p> &#160; &#160;},</p> <p> &#160; &#160;set_DefaultImage: function(value) {</p> <p> &#160; &#160; &#160; &#160;this._defaultimage = value;</p> <p> &#160; &#160;},</p> <p> &#160; &#160;get_PreviewImage: function() {</p> <p> &#160; &#160; &#160; &#160;return this._previewimage();</p> <p> &#160; &#160;},</p> <p> &#160; &#160;set_PreviewImage: function(value) {</p> <p> &#160; &#160; &#160; &#160;this._previewimage = value;</p> <p> &#160; &#160;},</p> <p> &#160; &#160;get_TargetImageID: function() {</p> <p> &#160; &#160; &#160; &#160;return this._targetimageid;</p> <p> &#160; &#160;},</p> <p> &#160; &#160;set_TargetImageID: function(value) {</p> <p> &#160; &#160; &#160; &#160;this._targetimageid = value;</p> <p> &#160; &#160;},</p> <p> &#160; &#160;// Event Handlers</p> <p> &#160; &#160;_onChange: function() {</p> <p> &#160; &#160; &#160; &#160;// Get a ref to the image element</p> <p> &#160; &#160; &#160; &#160;var &#160;img = $get(this._targetimageid);</p> <p> &#160; &#160; &#160; &#160;//be sure there is an imagecontrol to work with</p> <p> &#160; &#160; &#160; &#160;if (img &amp;&amp; !img.disabled &amp;&amp; img.src != this.get_PreviewImage()) {</p> <p> &#160; &#160; &#160; &#160; &#160; &#160;// Set the source to the preview image</p> <p> &#160; &#160; &#160; &#160; &#160; &#160;img.src = this.get_PreviewImage();</p> <p> &#160; &#160; &#160; &#160;}</p> <p> &#160; &#160; &#160; &#160;else {</p> <p> &#160; &#160; &#160; &#160; &#160; &#160;if (img.src != this.get_DefaultImage) {</p> <p> &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;//set it to the disabled image immediately </p> <p> &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;img.src = this.get_DefaultImage();</p> <p> &#160; &#160; &#160; &#160; &#160; &#160;}</p> <p> &#160; &#160; &#160; &#160;}</p> <p> &#160; &#160;}</p> <p>}</p> <p>Ajax.UserControls.ImagePreview.registerClass(&#39;Ajax.UserCont rols.ImagePreview&#39;, Sys.UI.Behavior);</p> <p>if (typeof(Sys) !== &#39;undefined&#39;) Sys.Application.notifyScriptLoaded();</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/Dollarjunkie.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by ex glider pilot</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Fri, 12 Jun 2009 12:43:56 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001762</guid><description><![CDATA[ <p>Hi I have a web project (type file) and I have added the sample files, checked my references are there, complied the project and i can see the dll in the customextenders folder - but i do not get the control added to the tool box.. any suggestions what might be wrong? I tried manually adding a refernce to the customcontrol.dll still no sign of the controls in the toolbox  </p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/ex%20glider%20pilot.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by panand</title><link>http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-create-an-aspnet-ajax-extender-from-scratch</link><pubDate>Sun, 09 Aug 2009 22:09:07 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000001763</guid><description><![CDATA[ <p>The $create error is an unpredicatable error caused by 2 issues:</p><p>1. The curly braces are missing after the function keyword</p><p>AND/OR</p><p>2. The comma that separates the property accessors and the function proto-types is missing (Chris makes a mention of this explicity in the tutorial that the commas are not to be forgotten)</p><p>3. Also, test your app in FireFox. The Error Console will produce a URL to the .axd javascript source. If you click on the URL, the javascript is rendered in a Firefox window with the location of the error highlighted.</p><p></p><p>Putting the 2 together, here&#39;s what the code must look like:</p><p>set_DisabledText : function(value) {</p><p>        this._disabledTextValue = value;</p><p>    },  //**DO NOT FORGET THIS SEPERATOR- COMMA **</p><p>    _onkeyup: function() //**DO NOT FORGET THESE BRACES **</p><p>{... rest of the code ..} //** NO COMMA IF THIS IS THE LAST PROTOTYPE OR ACCESSOR</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/panand.jpg?forceidenticon=false&amp;dt=635050585800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>