我的下面的代碼工作正常,除非單擊按鈕「繼續」時,它不會發送值爲true。jQuery對話框點擊按鈕時如何通過'True'
<script type="text/javascript">
function EmpDelete(f_name) {
$("#fName").text(f_name);
$('#dialog').dialog({
title: "Delete Employee?",
modal: true,
width: 500,
height: 250,
buttons: {
"Cancel": function() {
$(this).dialog("close");
},
"Continue": function() {
$(this).dialog("close");
// return true;
}
}
});
return false;
};
</script>
當imgDelete ImageButton被點擊時,上面的jQuery事件被調用。
e.Row.Cells[iDelete].Controls.Add
(new ImageButton
{
ImageUrl = "Images/database_delete.png",
CommandArgument = e.Row.RowIndex.ToString(),
CommandName = "Delete",
ID = "imgDelete",
CssClass = "imgDelete",
OnClientClick = "return EmpDelete('" + e.Row.Cells[iFNmae].Text + "');",
ClientIDMode = System.Web.UI.ClientIDMode.Static
});
我怎樣才能讓「繼續」 jQuery的按鈕返回true值,所以我的「RowCommend」事件可以做進一步的處理?
protected void gv_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Delete")
{
}
}