<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>AJAX</title>
        <link>http://blogs.ugidotnet.org/franx_blog/category/AJAX.aspx</link>
        <description>AJAX</description>
        <language>it-IT</language>
        <copyright>Francesco Geri</copyright>
        <generator>Subtext Version 2.6.0.0</generator>
        <item>
            <title>UpdatePanel e focus delle Textbox</title>
            <link>http://blogs.ugidotnet.org/franx_blog/archive/2008/12/12/updatepanel-e-focus-delle-textbox.aspx</link>
            <description>&lt;p&gt;Inserendo una Textbox in un UpdatePanel (AJAX) può succedere (o succede sempre?) che la textbox perda il focus, o non lo possa prendere affatto.&lt;/p&gt;
&lt;p&gt;Un modo per ovviare alla cosa è di registrare uno script che imposti il focus con un piccolo ritardo rispetto alla load:&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;Dim&lt;/span&gt; script &lt;span style="color: rgb(0, 0, 255);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;String&lt;/span&gt; = &lt;span style="color: rgb(0, 96, 128);"&gt;"setTimeout("&lt;/span&gt;&lt;span style="color: rgb(0, 96, 128);"&gt;"$('"&lt;/span&gt; &amp;amp; MyTextBox.ClientID &amp;amp; &lt;span style="color: rgb(0, 96, 128);"&gt;"').focus(); "&lt;/span&gt;&lt;span style="color: rgb(0, 96, 128);"&gt;", 100);"&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; ScriptManager.RegisterStartupScript(updSearch, &lt;span style="color: rgb(0, 0, 255);"&gt;GetType&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 255);"&gt;String&lt;/span&gt;), &lt;span style="color: rgb(0, 96, 128);"&gt;"set_focus_script"&lt;/span&gt;, script, &lt;span style="color: rgb(0, 0, 255);"&gt;True&lt;/span&gt;)&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/franx_blog/aggbug/94918.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Francesco Geri</dc:creator>
            <guid>http://blogs.ugidotnet.org/franx_blog/archive/2008/12/12/updatepanel-e-focus-delle-textbox.aspx</guid>
            <pubDate>Fri, 12 Dec 2008 16:30:11 GMT</pubDate>
            <comments>http://blogs.ugidotnet.org/franx_blog/archive/2008/12/12/updatepanel-e-focus-delle-textbox.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blogs.ugidotnet.org/franx_blog/comments/commentRss/94918.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>