Tag: jquery chosen

如何防止selectindexchange上的整页回发以获取下拉列表

<asp:ImageButton ImageUrl="~/cies.png" runat="server" ID="btnShowDepend" OnCommand="btnShowDepend_Command" CommandName="TaskDepend" CommandArgument='’ ToolTip=”Click to view Dependencies” /> <%– –%> 每当执行ddlTaskName_onSelectIndexChanged函数时,都会有一个完整的页面回发,而不仅仅是更新UpdatePanel ddlTaskName_onSelectIndexChanged函数: protected void ddlTaskName_onSelectIndexChanged(object sender, EventArgs e) { PullData(ViewState[“sortExp”].ToString(), ViewState[“sortOrder”].ToString(), false); //calls a function to update the GridView } 使用上面的代码,只要在ddlTaskName更改索引,页面就会执行完全回发而不是仅部分(仅更新GridView) 我可以添加/修改哪些代码以确保不执行完整的回发,并且仅在更改索引时更新GridView。 想…我需要在两个单独的UpdatePanel中添加它们吗? 如果我取消注释triggers , A control with ID ‘ddlTaskName’ could not be found for the trigger in UpdatePanel ‘TasksUpdatePanel’.出现以下错误: A […]