Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's been two weeks since I asked this question, and I am assuming that nobody will answer, so for the record, I will post how I actually solved this problem.</p> <ol> <li><p>I changed from using an html Table to using an Unordered list. (an option that I had previously ignored because of my perceived difficulty in styling the <code>&lt;UL&gt;</code>.</p></li> <li><p>I added two hidden fields, one to trigger whether or not the event had fired, and one to store the selected value.</p></li> </ol> <p><code>&lt;asp:HiddenField runat="server" ID="hidSelectionChanged" Value="false"/&gt;</code> <code>&lt;asp:HiddenField runat="server" ID="hidSelectionValue" Value=""/&gt;</code></p> <p>I created the "change" event as follows:</p> <pre><code>function onchange(param) { var chg = document.getElementById('&lt;%=hidSelectionChanged.ClientID%&gt;'); var val = document.getElementById('&lt;%=hidSelectionValue.ClientID%&gt;'); if (chg) { chg.value = 'true'; } if (val) { val.value = param; } __doPostBack('pnlResults', ''); } </code></pre> <p>Then in each <code>LI</code> of the <code>UL</code> I had this code:</p> <pre><code>&lt;li class="ddl_li"&gt;&lt;a href="javascript:onchange('Summary_1')"&gt;Summary&lt;/a&gt;&lt;/li&gt; </code></pre> <p>The result was a full page post-back, but in the <code>Page_Load</code> event of the Page, I could now check <code>hidSelectionChanged.Value</code> to see if the PostBack was triggered by my dropdown, and I could check <code>hidSelectionValue.Value</code> to get the selected value.</p> <p>In the end, all worked out well.</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.
 

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