<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx</link><description>For the purposes of my next post, I built a neat little edit in place behavior and I thought it deserved its own post. It does a pretty good job at showing how easy it is to build a clean behavior using ASP.NET Ajax. It’s always good to go back to the</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6764238</link><pubDate>Wed, 03 Dec 2008 17:37:33 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6764238</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@Pete: Sure, if you read the follow-up to this post, you'll see a simplified version of this component and a discussion why the focus pseudo-class is not quite usable yet.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/bleroy/archive/2008/11/24/simplifying-the-edit-in-place-behavior.aspx"&gt;weblogs.asp.net/.../simplifying-the-edit-in-place-behavior.aspx&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6764238" width="1" height="1"&gt;</description></item><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6764045</link><pubDate>Wed, 03 Dec 2008 15:14:51 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6764045</guid><dc:creator>Pete Hurst</dc:creator><author>Pete Hurst</author><description>&lt;p&gt;Sounds like this effect (especially Nikhil&amp;#39;s version) could be acheived with two simple CSS rules:&lt;/p&gt;
&lt;p&gt;input {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;border:none;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;input:focus {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;border:....&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Good to see a solid example of an AJAX behaviour, however make sure you&amp;#39;re not encouraging &amp;quot;using a sledgehammer to crack a nut&amp;quot; stories!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6764045" width="1" height="1"&gt;</description></item><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6751876</link><pubDate>Mon, 24 Nov 2008 18:06:10 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6751876</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;@Rick: sure, there's a lot more you can do, and that wasn't the point of this exercise. I just built this because I needed something simple to use in samples. As I was building it, I realized it would also be a nice example of how to build components for Microsoft Ajax. If you're in the market for a professional edit in place control, this is not it. :)&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6751876" width="1" height="1"&gt;</description></item><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6751266</link><pubDate>Mon, 24 Nov 2008 09:55:56 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6751266</guid><dc:creator>Rick Strahl</dc:creator><author>Rick Strahl</author><description>&lt;p&gt;Bertrand - Cool, but maybe a little simplistic. This approach falls flat when you have any sort of formatting (including spaces) in your HTML. Won&amp;#39;t work if you have formatted text (like bold/italics) etc. if you&amp;#39;re using a textbox for display.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve built something like this some time ago for jQuery with any content converting to a textbox/textarea and it gets out of control pretty quickly to handle carriage returns, links etc. properly.&lt;/p&gt;
&lt;p&gt;Have you given any thought to just using the DomElement.contentEditable instead of a textbox? &lt;/p&gt;
&lt;p&gt;$(&amp;quot;#editableControl).get(0).contentEditable = true;&lt;/p&gt;
&lt;p&gt;That would make it much easier to in place editing and completely side step the issues of converting to and from plain text first and capture the essence of the html displayed. &lt;/p&gt;
&lt;p&gt;You should be able to make any content editable this way and it looks like all major recent browsers now support this functionality (IE, FF, Opera, WebKit)&lt;/p&gt;
&lt;p&gt;That may have issues of its own though - if you&amp;#39;re only interested in plain text.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6751266" width="1" height="1"&gt;</description></item><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6749739</link><pubDate>Fri, 21 Nov 2008 19:35:39 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6749739</guid><dc:creator>PLJdn</dc:creator><author>PLJdn</author><description>&lt;p&gt;The link for the source is stange. When i try to download the source in Opera i get a 404. If i use IE it is fine.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6749739" width="1" height="1"&gt;</description></item><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6749732</link><pubDate>Fri, 21 Nov 2008 19:31:43 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6749732</guid><dc:creator>Tiamat</dc:creator><author>Tiamat</author><description>&lt;p&gt;Great example! it would be nice to see this edit in place along with other behaviors as you said the autocomplete and the watermark&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6749732" width="1" height="1"&gt;</description></item><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6749667</link><pubDate>Fri, 21 Nov 2008 18:33:54 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6749667</guid><dc:creator>bdukes</dc:creator><author>bdukes</author><description>&lt;p&gt;hmmm... tried it a couple of times this morning, just tried it again and it works fine. &amp;nbsp;Definitely weird. &amp;nbsp;Thanks for the tutorial/code!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6749667" width="1" height="1"&gt;</description></item><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6749664</link><pubDate>Fri, 21 Nov 2008 18:27:24 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6749664</guid><dc:creator>Bertrand Le Roy</dc:creator><author>Bertrand Le Roy</author><description>&lt;p&gt;That is weird. I tried the link yesterday and just tried it again, it downloads fine. Maybe something to do with your proxy or firewall?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6749664" width="1" height="1"&gt;</description></item><item><title>re: Building a neat edit in place behavior</title><link>http://weblogs.asp.net/bleroy/archive/2008/11/20/building-a-neat-edit-in-place-behavior.aspx#6749654</link><pubDate>Fri, 21 Nov 2008 18:22:44 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6749654</guid><dc:creator>bdukes</dc:creator><author>bdukes</author><description>&lt;p&gt;Your source code link is giving me a 404 error...&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6749654" width="1" height="1"&gt;</description></item></channel></rss>