Note that there are some explanatory texts on larger screens.

plurals
  1. POAsp .Net update panel not updating
    text
    copied!<p>I have 2 pages each with an update panel. It has the same content and the same trigger on both pages.</p> <p>This is how it looks:</p> <pre><code> &lt;div id="rating"&gt; &lt;span class="rateTxt"&gt;Rate&lt;/span&gt; &lt;telerik:RadRating ID="RadRating1" runat="server" ItemCount="5" SelectionMode="Continuous" Precision="Item" Skin="Default" OnRate="RadRating1_Rate" AutoPostBack="true"&gt; &lt;/telerik:RadRating&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;asp:UpdatePanel ID="UpdatePanel2" runat="server"&gt; &lt;ContentTemplate&gt; &lt;div id="divAddMessage" runat="server" visible="false"&gt; &lt;span class="rateTxt"&gt;Do you want to add a comment?&lt;/span&gt; &lt;asp:TextBox runat="server" ID="txtComment" TextMode="MultiLine" Rows="3" Width="195"&gt; &lt;/asp:TextBox&gt; &lt;br /&gt; &lt;br /&gt; &lt;asp:ImageButton runat="server" ID="lnkAddComment" ImageUrl="~/App_Themes/123reg/Images/submit-rating.png" OnClick="lnkAddComment_Click" OnClientClick="showSuccessMessage();" /&gt; &lt;br /&gt; &lt;br /&gt; &lt;/div&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="RadRating1" EventName="Rate" /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; </code></pre> <p>Now when the user rates something with the RadRating the Rate event is triggered which causes a postback.</p> <p>On the handler for the Rate event I do the following:</p> <pre><code> protected void RadRating1_Rate(object sender, EventArgs e) { divAddMessage.Visible = true; } </code></pre> <p>The same code is exactly on 2 pages. On one page it updates the divAddMessage and it becomes visible but on another page it doesn't become visible. Even if I set it to visible on that page when it postback again the Visible property is still false even after setting it to true in the above handler.</p> <p>I only set the visibily to false in the aspx file and in the above handler I set it to true. </p> <p>It turns out that I get an error in the javascript console:</p> <pre><code>Sys.InvalidOperationException: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_mainContentPlaceHolder_updatePanel'. If it is being updated dynamically then it must be inside another UpdatePanel. </code></pre> <p>I have another update panel inside a multiview. But because the active view is not the one with the update panel on postback the update panel isn't rendered. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload