Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to enable buttons that were disabled via asynchrous trigger via code behind
    primarykey
    data
    text
    <p>I have a couple of buttons in an update panel that gets disabled from code behind on certain triggers like depending it wrote to database or not. Now on the client i have a reset button, This button resets all components on the page like a asp:dropdown, textbox etc, except for the ones in the update panel. I'm usning a javascript to reset it but these ones in the update panel never gets reset. Any help will be appreciated.</p> <pre><code>&lt;td valign="top" align="center" width="50%"&gt; &lt;asp:UpdatePanel ID="updTxtGen" runat="server" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;asp:TextBox ID="txtGenVVOE" name= "txtGenVVOE" TextMode="MultiLine" runat="server" style="font-size: 11px" rows="4" cols="44" Width="324px&gt; &lt;/asp:TextBox&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="btnCreateNote" EventName="Click" /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" align="center" width="50%"&gt; &lt;asp:UpdatePanel ID="updateCopy" runat="server" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;asp:Button name ="btnCopy" ID="btnCopy" class="btn" runat="server" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'" style="background: silvergradient" Text="COPY" OnClientClick="ClipBoard();return false;" ToolTip="Copy Text to ClipBoard" /&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="btnCreateNote" EventName="Click" /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; </code></pre> <p>and my JS script is very simple , i get the </p> <pre><code> document.getElementById('btnCopy').enabled = true; document.getElementById('txtGenVVOE').enabled = true; </code></pre> <p>Like I mentioned , all elements get reset except the ones disabled from code behind.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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