Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It might be too late to change the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listcontrol.autopostback.aspx" rel="nofollow">AutoPostBack</a> property in your event handling phase: the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.aspx" rel="nofollow">UpdatePanel</a> may already have registered its triggers.</p> <p>I would start by disabling <code>AutoPostBack</code> and <code>ViewState</code> (which remembers <code>AutoPostBack</code>) on the list box:</p> <pre><code>&lt;asp:ListBox ID="lbAvailableForms" runat="server" AutoPostBack="False" EnableViewState="False" Style="height: 125px; width: 95%;" OnSelectedIndexChanged="lbAvailableForms_SelectedIndexChanged"&gt; &lt;/asp:ListBox&gt; </code></pre> <p>Then introduce a private member to keep track of what we want to do and set that member in the event handler:</p> <pre><code>private bool _disableAutoPostBack = false; protected void RLCompareParameter_SelectedIndexChanged(object sender, EventArgs e) { _disableAutoPostBack = true; } </code></pre> <p>Then use it in the <code>PreRender</code> phase afterwards:</p> <pre><code>protected void Page_PreRender(object sender, EventArgs e) { lbAvailableForms.AutoPostBack = !_disableAutoPostBack; } </code></pre> <p>Then hope it works as it is, so we don't have to dynamically register an <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.asyncpostbacktrigger.asyncpostbacktrigger.aspx" rel="nofollow">AsyncPostBackTrigger</a> on the <code>ListBox</code>, which would be messy.</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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