这似乎是一个有明显解决方案的常见场景,但不知何故我还没有遇到过。
我有一个DropDownList与事件绑定的事件处理程序SelectedIndexChanged,AutoPostback="true"并且按预期工作。
事件处理程序在值发生更改时执行,但如果在客户端使用 jQuery 通过脚本更改值,并且随后在用户更改值时触发回发(并且下拉onchange事件触发),然后服务器端代码检测到自服务器上次看到其状态以来该值没有更改,因此事件处理程序不在服务器端运行。
似乎可以通过视图状态加载某些内容,但禁用ViewState无效。
- 该页面呈现下拉菜单并选择了值“A”。
 - 用户将下拉列表更改为值“B”。
 - 该值会自动发布到服务器,并
SelectedIndexChanged执行事件处理程序。 - 运行客户端脚本以使用 将客户端上的值更改回“A” 
jQuery.val()。 - 用户将值改回“B”。
 - 该值会自动发布到服务器,但由于在服务器上次呈现页面时该值为“B”,因此
SelectedIndexChanged不会执行事件处理程序。 
客户端
<asp:DropDownList ID="dlst" runat="server" AutoPostBack="true" OnSelectedIndexChanged="dlst_SelectedIndexChanged">
    <asp:ListItem Text="A" Value="A" />
    <asp:ListItem Text="B" Value="B" />
</asp:DropDownList>
<asp:Button ID="btnChange" runat="server" Text="Change" OnClientClick="return changeDDL(this,event)" />
<script type="text/javascript">
    function changeDDL(sender, e) {
        var dlst = $("#<%= dlst.ClientID %>");
        dlst.val(dlst.val() === "A" ? "B" : "A");
        return false;
    }
</script>
服务器端
protected void dlst_SelectedIndexChanged(object sender, EventArgs e)
{
    btnChange.Text = dlst.SelectedValue == "A" ? "Change B" : "Change A";
}