<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Seamless inline text editing with ASP.NET AJAX</title>
	<atom:link href="http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:50:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Another Cool ASP.NET AJAX InLineEdit Label Control : MS-Joe</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-40050</link>
		<dc:creator>Another Cool ASP.NET AJAX InLineEdit Label Control : MS-Joe</dc:creator>
		<pubDate>Sat, 09 Oct 2010 14:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-40050</guid>
		<description>[...] http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/" rel="nofollow">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shash</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-36658</link>
		<dc:creator>Shash</dc:creator>
		<pubDate>Wed, 07 Oct 2009 19:42:51 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-36658</guid>
		<description>let&#039;s say you have multiple no of TextBoxes and Labels. Then you can use the following code to get your javascript
ASPX
&lt;pre lang=&quot;asp.net&quot;&gt;
   
    
    
    
    
    
       
    
     
    

    

    
        
    
    
&lt;/pre&gt;

CS
&lt;pre lang=&quot;c#&quot;&gt;
protected void Page_Load(object sender, EventArgs e)
    {
        string lables = &quot;Label1,Label2&quot;;
        string textboxes = &quot;TextBox1,TextBox2&quot;;
        lblInjectJS.Text = injectJS(lables, textboxes);
    }

    private string injectJS(string labels, string textBoxes)
    {
        StringBuilder sb = new StringBuilder();
        string[] aLabels = labels.Split(&#039;,&#039;);
        string[] aTextBoxes = textBoxes.Split(&#039;,&#039;);
        sb.Append(@&quot; 
            var &quot; + labels + &quot;,&quot; + labels + &quot;;&quot; + @&quot;
            Sys.Application.add_init(AppInit);
            function AppInit(sender) {
            &quot;); 

              for (int i=0;i&lt;aLabels.Length;i++)
              {
                  sb.Append(@&quot;
                        theLabel = $get(&#039;theLabel&#039;);
                        theTextBox = $get(&#039;theTextBox&#039;);
                        theLabel.onclick = function() { theTextBox.value = theLabel.innerHTML;theLabel.style.display = &#039;none&#039;;theTextBox.style.display = &#039;&#039;; theTextBox.focus();theTextBox.select();};  
                        theTextBox.onblur = function(){theLabel.innerHTML = theTextBox.value;theTextBox.style.display = &#039;none&#039;;theLabel.style.display = &#039;&#039;;  }
                        theTextBox.onkeydown = function(event){var event=window.event &#124;&#124; event;if (event.keyCode == 13) {theTextBox.blur();}}
                &quot;.Replace(&quot;theLabel&quot;, aLabels[i].Trim()).Replace(&quot;theTextBox&quot;, aTextBoxes[i].Trim())); 
              }
            sb.Append(@&quot;
            }
            
        &quot;);
        return sb.ToString();
    }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>let&#8217;s say you have multiple no of TextBoxes and Labels. Then you can use the following code to get your javascript<br />
ASPX</p>
<pre lang="asp.net">
</pre>
<p>CS</p>
<pre lang="c#">
protected void Page_Load(object sender, EventArgs e)
    {
        string lables = "Label1,Label2";
        string textboxes = "TextBox1,TextBox2";
        lblInjectJS.Text = injectJS(lables, textboxes);
    }

    private string injectJS(string labels, string textBoxes)
    {
        StringBuilder sb = new StringBuilder();
        string[] aLabels = labels.Split(',');
        string[] aTextBoxes = textBoxes.Split(',');
        sb.Append(@"
            var " + labels + "," + labels + ";" + @"
            Sys.Application.add_init(AppInit);
            function AppInit(sender) {
            "); 

              for (int i=0;i&lt;aLabels.Length;i++)
              {
                  sb.Append(@&quot;
                        theLabel = $get(&#039;theLabel&#039;);
                        theTextBox = $get(&#039;theTextBox&#039;);
                        theLabel.onclick = function() { theTextBox.value = theLabel.innerHTML;theLabel.style.display = &#039;none&#039;;theTextBox.style.display = &#039;&#039;; theTextBox.focus();theTextBox.select();};
                        theTextBox.onblur = function(){theLabel.innerHTML = theTextBox.value;theTextBox.style.display = &#039;none&#039;;theLabel.style.display = &#039;&#039;;  }
                        theTextBox.onkeydown = function(event){var event=window.event || event;if (event.keyCode == 13) {theTextBox.blur();}}
                &quot;.Replace(&quot;theLabel&quot;, aLabels[i].Trim()).Replace(&quot;theTextBox&quot;, aTextBoxes[i].Trim()));
              }
            sb.Append(@&quot;
            }

        ");
        return sb.ToString();
    }
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collection of AJAX Inline Edit Plugins - DoNotYet.com</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-36621</link>
		<dc:creator>Collection of AJAX Inline Edit Plugins - DoNotYet.com</dc:creator>
		<pubDate>Sun, 04 Oct 2009 13:02:58 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-36621</guid>
		<description>[...] Seamless inline text editing with ASP.NET AJAX [...]</description>
		<content:encoded><![CDATA[<p>[...] Seamless inline text editing with ASP.NET AJAX [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 10個直接編輯欄位(Edit In-Place)參考 @ Jimmy&#8217;s code</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-36257</link>
		<dc:creator>10個直接編輯欄位(Edit In-Place)參考 @ Jimmy&#8217;s code</dc:creator>
		<pubDate>Tue, 18 Aug 2009 03:44:18 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-36257</guid>
		<description>[...] Seamless inline text editing -Written for ASP.Net. It works like the rest of them by clicking on the text and it will become editable. [...]</description>
		<content:encoded><![CDATA[<p>[...] Seamless inline text editing -Written for ASP.Net. It works like the rest of them by clicking on the text and it will become editable. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Me, myself and I</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-36212</link>
		<dc:creator>Me, myself and I</dc:creator>
		<pubDate>Fri, 14 Aug 2009 15:50:49 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-36212</guid>
		<description>Got it! I placed the webmethod in the codebehind file, just marked it as webmethod, added the EnablePageMethods to the script manager, but then there&#039;s something I didn&#039;t find documented anywhere, just in an example somewhere I didn&#039;t bookmark:

- add this line to you aspx page (I suppose adding it to the master page is also OK):

&lt;%@ Import Namespace=&quot;System.Web.Services&quot; %&gt;

- add a reference to PageMethod.js to your script manager:

&lt;Scripts&gt;
    &lt;asp:ScriptReference Path=&quot;PageMethod.js&quot;/&gt;
&lt;/Scripts&gt;

Nothing worked no matter what until I did this.</description>
		<content:encoded><![CDATA[<p>Got it! I placed the webmethod in the codebehind file, just marked it as webmethod, added the EnablePageMethods to the script manager, but then there&#8217;s something I didn&#8217;t find documented anywhere, just in an example somewhere I didn&#8217;t bookmark:</p>
<p>- add this line to you aspx page (I suppose adding it to the master page is also OK):</p>
<p>&lt;%@ Import Namespace=&#8221;System.Web.Services&#8221; %&gt;</p>
<p>- add a reference to PageMethod.js to your script manager:</p>
<p>&lt;Scripts&gt;<br />
    &lt;asp:ScriptReference Path=&#8221;PageMethod.js&#8221;/&gt;<br />
&lt;/Scripts&gt;</p>
<p>Nothing worked no matter what until I did this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-35876</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 20 Jul 2009 15:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-35876</guid>
		<description>I don&#039;t get it. I did all this and clicking on my label nothing happens at all. Nice</description>
		<content:encoded><![CDATA[<p>I don&#8217;t get it. I did all this and clicking on my label nothing happens at all. Nice</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 15 Ajax- Edit in The Place Scripts. &#124; Theme Heven</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-34663</link>
		<dc:creator>15 Ajax- Edit in The Place Scripts. &#124; Theme Heven</dc:creator>
		<pubDate>Sun, 29 Mar 2009 06:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-34663</guid>
		<description>[...] 8. Seamless inline text editing with ASP.NET AJAX [...]</description>
		<content:encoded><![CDATA[<p>[...] 8. Seamless inline text editing with ASP.NET AJAX [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 10 Edit In-Place Ajax Scripts &#171; Phptoday&#8217;s Blog</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-33754</link>
		<dc:creator>10 Edit In-Place Ajax Scripts &#171; Phptoday&#8217;s Blog</dc:creator>
		<pubDate>Mon, 05 Jan 2009 08:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-33754</guid>
		<description>[...] Seamless inline text editing -Written for ASP.Net. It works like the rest of them by clicking on the text and it will become editable. [...]</description>
		<content:encoded><![CDATA[<p>[...] Seamless inline text editing -Written for ASP.Net. It works like the rest of them by clicking on the text and it will become editable. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: awake</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-33609</link>
		<dc:creator>awake</dc:creator>
		<pubDate>Sun, 14 Dec 2008 12:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-33609</guid>
		<description>vidya...

did you ever find a way to refactor the code so you can use it for multiple textboxes?</description>
		<content:encoded><![CDATA[<p>vidya&#8230;</p>
<p>did you ever find a way to refactor the code so you can use it for multiple textboxes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-33425</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Sat, 29 Nov 2008 20:06:24 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-33425</guid>
		<description>Refactoring the code for reuse is beyond the scope of this example.  I&#039;d suggest duplicating the code, analyzing what appears to be redundant, and then refactoring it to eliminate those redundancies.</description>
		<content:encoded><![CDATA[<p>Refactoring the code for reuse is beyond the scope of this example.  I&#8217;d suggest duplicating the code, analyzing what appears to be redundant, and then refactoring it to eliminate those redundancies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vidhya</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-33414</link>
		<dc:creator>vidhya</dc:creator>
		<pubDate>Fri, 28 Nov 2008 08:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-33414</guid>
		<description>hi its nice feature and it works well also for me..
Wat i wud like to know is ... suppose if i have to implement the same feature for two text boxes, do i need to write all these functions two times.. or is there any other way to do so...

waiting for ur reply...</description>
		<content:encoded><![CDATA[<p>hi its nice feature and it works well also for me..<br />
Wat i wud like to know is &#8230; suppose if i have to implement the same feature for two text boxes, do i need to write all these functions two times.. or is there any other way to do so&#8230;</p>
<p>waiting for ur reply&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-31192</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Thu, 26 Jun 2008 19:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-31192</guid>
		<description>Nevermind, I figured out what the problem was and it was all mine :)

Thanks again!</description>
		<content:encoded><![CDATA[<p>Nevermind, I figured out what the problem was and it was all mine :)</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-31191</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Thu, 26 Jun 2008 19:12:15 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-31191</guid>
		<description>Great example, it works great in IE, but I can&#039;t seem to get it to work in FireFox.

I&#039;m using the current version (2.0.0.14).

Anything I can do to get this working in both without too much trouble?

Thanks a bunch and keep up the great work!</description>
		<content:encoded><![CDATA[<p>Great example, it works great in IE, but I can&#8217;t seem to get it to work in FireFox.</p>
<p>I&#8217;m using the current version (2.0.0.14).</p>
<p>Anything I can do to get this working in both without too much trouble?</p>
<p>Thanks a bunch and keep up the great work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edit In-Place Ajax Scripts &#171; Renganathan&#8217;s Weblog</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-23401</link>
		<dc:creator>Edit In-Place Ajax Scripts &#171; Renganathan&#8217;s Weblog</dc:creator>
		<pubDate>Sun, 11 May 2008 10:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-23401</guid>
		<description>[...] Seamless inline text editing -Written for ASP.Net. It works like the rest of them by clicking on the text and it will become editable. [...]</description>
		<content:encoded><![CDATA[<p>[...] Seamless inline text editing -Written for ASP.Net. It works like the rest of them by clicking on the text and it will become editable. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Web sayfalarınız i&#231;in yerinde d&#252;zenleme (edit in place) &#124; Göstergeç.net</title>
		<link>http://encosia.com/seamless-inline-text-editing-with-aspnet-ajax/#comment-12153</link>
		<dc:creator>Web sayfalarınız i&#231;in yerinde d&#252;zenleme (edit in place) &#124; Göstergeç.net</dc:creator>
		<pubDate>Sun, 09 Mar 2008 01:01:33 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/08/23/seamless-inline-text-editing-with-aspnet-ajax/#comment-12153</guid>
		<description>[...] Seamless inline text editing -ASP.Net i&#231;in yazılmış bir yerinde d&#252;zenleme scripti. [...]</description>
		<content:encoded><![CDATA[<p>[...] Seamless inline text editing -ASP.Net i&#231;in yazılmış bir yerinde d&#252;zenleme scripti. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

