Note that there are some explanatory texts on larger screens.

plurals
  1. POusing runat="server" gives Validation of viewstate MAC failed
    primarykey
    data
    text
    <p><strong>Javascript</strong></p> <pre><code>var form = document.getElementById('date_budget'); pop('', 'exp_upd', '95', '80'); form.action = "test.aspx"; form.target = 'exp_upd'; form.submit(); </code></pre> <p><strong>HTML</strong></p> <pre><code>&lt;form id="date_budget" name="date_budget" method="post"&gt; &lt;table&gt; &lt;tr&gt; &lt;!--#include file="zone.inc" --&gt; &lt;td id='mlodg_loc'&gt;&lt;select name="loc" id="loc"&gt; &lt;option value="Select Location"&gt;Select Location&lt;/option&gt; &lt;/select&gt;&lt;/td&gt; &lt;td&gt; &lt;select name="month" id="month"&gt; &lt;option value="1"&gt;1&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;td&gt; &lt;select name="year" id="year"&gt; &lt;option value="2013"&gt;2013&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; </code></pre> <p>The above code opens a popup window, but when I change the html by adding the runat attribute, I am getting “Validation of viewstate MAC failed”, and some extra junk. the modified html is below</p> <pre><code>&lt;form id="date_budget" name="date_budget" method="post" runat="server"&gt; &lt;table&gt; &lt;tr&gt; &lt;!--#include file="zone.inc" --&gt; &lt;td id='mlodg_loc'&gt;&lt;select name="loc" id="loc" runat="server"&gt; &lt;option value="Select Location"&gt;Select Location&lt;/option&gt; &lt;/select&gt;&lt;/td&gt; &lt;td&gt; &lt;select name="month" id="month" runat="server"&gt; &lt;option value="1"&gt;1&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;td&gt; &lt;select name="year" id="year" runat="server"&gt; &lt;option value="2013"&gt;2013&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; </code></pre> <p>Is there any workaround to use both the runat server and using the same element in JS, without using those asp tags something like <code>&lt;%= hidBT.ClientID %&gt;</code> I don't want that any other way.</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.
 

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