我的移动 aspx 页面中有一个 asp:DropDownList 元素。
<asp:DropDownList ID="formulationSelect" AutoPostBack ="true" EnableViewState =" true" runat="server"></asp:DropDownList>
<asp:DropDownList ID="languageSelect" AutoPostBack ="true" EnableViewState =" true" runat="server"></asp:DropDownList>
我在我的普通 aspx 页面上有完全相同的代码(这很好用)。I am wanting it so that when a different value is selected it performs a postback (no method is needing to be fired) but when it postbacks, the code then uses the new selected value in the dropdown box to load new objects.
问题是当我选择不执行回发的值时,我收到错误:
Uncaught TypeError: Cannot set property 'value' of undefined
__doPostBack
(anonymous function)