0
我正在使用jquery simple modal。jquery modal没有从asp下拉列表中选择值
function showCancelledModal() {
$('#<%=CancelledPanel.ClientID %>').modal({ appendTo: 'form' });
}
<asp:Panel ID="CancelledPanel" runat="server" Style="display: none">
<asp:DropDownList ID="CancelledDropDownList" runat="server"></asp:DropDownList>
<asp:Button ID="CancelButton" runat="server" Text="Cancel" OnClick="CancelButton_Click" />
</asp:Panel>
protected void CancelButton_Click(object sender, EventArgs e)
{
var item = CancelledDropDownList.SelectedItem.Value;
//CancelReservation(strReservationId);
}
问题是,在我的按钮单击事件它似乎并没有得到下拉列表中选定的值。它每次只默认第一个值。我将下拉列表绑定到页面加载事件中的表格。
任何人都可以提供任何建议吗?
提示:你重新绑定你的DDL后,复位selectedItem属性。 – 2013-03-21 14:33:12