如何在asp.net中显示带有yes和no按钮的模态弹出窗口

在我的页面上有一个生成按钮,根据用户给出的计数生成文件(如果10是输入,那么将生成10个文件),在该循环中,我想要求用户确认是否再次按下生成按钮并且我将为每个生成的文件显示此弹出窗口(如果他们再次按下按钮,则会出现10次弹出窗口)所以基于模态弹出窗口中的是或否按钮,我将生成文件。

这是我按钮上的代码:

protected void Button1_Click(object sender, EventArgs e) { int c = 0; for (int i = 0; i  0) { string message = c + " Folders are generated successfully"; string header = "Info"; ScriptManager.RegisterStartupScript(this, this.GetType(), "LaunchServerSide", "openModal('" + message + "','" + header + "','TranChargesMonthlyProcessing.aspx');", true); } else { string message = c + " Folder generated"; string header = "Info"; ScriptManager.RegisterStartupScript(this, this.GetType(), "LaunchServerSide", "openModal('" + message + "','" + header + "','TranChargesMonthlyProcessing.aspx');", true); } } protected void btnYes_Click(object sender, EventArgs e) { } //on cancel click of modal pop protected void btnNo_Click(object sender, EventArgs e) { } 

这是Modal PopUp:

   function getConfirmation(sender, title, message) { console.log("asas"); $("#spnTitle").text(title); $("#spnMsg").text(message); $('#modalPopUp').modal('show'); $('#btnConfirm').attr('onclick', "$('#modalPopUp').modal('hide');setTimeout(function(){" + $(sender).prop('href') + "}, 50);"); return false; }  

任何帮助将不胜感激。