<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.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>ASP.NET AJAX UI</title><link>http://forums.asp.net/1008.aspx</link><description>Here you can discuss UI-related issues with AJAX such as controls and client-side functionality including Silverlight controls for ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Problem with addhandler and updatepanel dinamicly</title><link>http://forums.asp.net/thread/3275293.aspx</link><pubDate>Sun, 05 Jul 2009 10:59:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3275293</guid><dc:creator>stevew1975</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3275293.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=3275293</wfw:commentRss><description>&lt;p&gt;I do not think it is possible the way you have done this, i will try and explain what is happening.&lt;/p&gt;&lt;p&gt;When you click on the button it will post back, then add the second button&amp;nbsp; dynamically which is fine.&amp;nbsp; &lt;/p&gt;&lt;p&gt;This dynamic button will not be in the viewstate.&amp;nbsp; When you click the dynamic button, the page will postback, but when reloading it is not in the viewstate so is not know about.&amp;nbsp; This then means that the button is not visible as you are seeing.&lt;/p&gt;&lt;p&gt;You will need to add any dynamic buttons within your page load.&amp;nbsp; I would then set the visible of the second button to false.&amp;nbsp; when you click the first button set the visible value of the second button to true.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Hope this helps.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Problem with addhandler and updatepanel dinamicly</title><link>http://forums.asp.net/thread/3274614.aspx</link><pubDate>Sat, 04 Jul 2009 12:12:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274614</guid><dc:creator>davideciarmi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274614.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=3274614</wfw:commentRss><description>&lt;p&gt;Hi at all! I&amp;#39;m italian, and i&amp;#39;m new in this forum...&lt;/p&gt;&lt;p&gt;i use Asp.net 3.5 and have an question with update panel and insert of button in it dinamicly.&lt;/p&gt;&lt;p&gt;I have 2 updatePanel, in Panel1 i have an button.&lt;/p&gt;&lt;p&gt;on click of this button i would add in Panel2 an new button, with an function associated, but all my tests not works!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;this is my html:&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="xhtml"&gt;&lt;/pre&gt;&lt;/p&gt;&lt;pre name="code" class="vb.net"&gt;&amp;lt;asp:UpdatePanel ID=&amp;quot;UpdatePanel1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
        &amp;lt;ContentTemplate&amp;gt;
            &amp;lt;asp:Button ID=&amp;quot;Button1&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Button&amp;quot; /&amp;gt;
        &amp;lt;/ContentTemplate&amp;gt;
    &amp;lt;/asp:UpdatePanel&amp;gt;

&amp;lt;asp:UpdatePanel ID=&amp;quot;UpdatePanel2&amp;quot; runat=&amp;quot;server&amp;quot; UpdateMode=&amp;quot;Conditional&amp;quot;&amp;gt;
        &amp;lt;ContentTemplate&amp;gt;
            
        &amp;lt;/ContentTemplate&amp;gt;
    &amp;lt;/asp:UpdatePanel&amp;gt;




this is the VB code:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim x As New Button
        x.ID = &amp;quot;bnTemporaneo&amp;quot;
        x.Text = &amp;quot;temporaneo&amp;quot;
        AddHandler x.Click, AddressOf Me.Mess
        UpdatePanel4.ContentTemplateContainer.Controls.Add(x)
        UpdatePanel4.Update()
        ScriptManager1.RegisterAsyncPostBackControl(x)
        UpdatePanel4.Update()
    End Sub

Public Sub Mess()
        MsgBox(&amp;quot;msg temp&amp;quot;)
End Function&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;But not work! button show, but if i click, it not call the function, and it will hide.&lt;/p&gt;&lt;p&gt;There are an solution at my problem? thanks very much!&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>