Why does IIS replace the Parameter for this doPostback js call?

时间:2018-09-18 19:50:27

标签: javascript asp.net iis-7.5

Background Context

I have an aspx page created by the previous developer. It's supposed to check the Form fields, and then if there is an error, highlight those fields, otherwise submit the form. However it's submitting the form even on an error. And I'm baffled. I've made some change to the page that has caused this error to start happening, but looking at the DIFF I can't see anything that would cause it.

I understand that the IIS7.5 server will add the _doPostBack. But I don't understand why the parameter is converted from:

checkValidation() to 'US_PC_SILVER'

original source code of create.aspx:

<td style="height: 60px; width: 35%">
<a onclick="javascript:return checkValidation();" id="US_PC_SILVER" class="cta cta-mid cta-primary" href="javascript:__doPostBack(&#39;US_PC_SILVER&#39;,&#39;&#39;)">Silver</a>
</td>

Page Source after the page is loaded and rendered:

<a onclick="javascript:return checkValidation();" id="US_PC_SILVER" class="cta cta-mid cta-primary" href="javascript:__doPostBack(&#39;US_PC_SILVER&#39;,&#39;&#39;)">Silver</a>
</td>

0 个答案:

没有答案