I have a modal boostrap that works perfectly, I call it in C # code-behind, like this:
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModal", "$(function() {openModalExclusao();});", true);
And this is the function to open:
function openModalExclusao() {
$("#modalexclusao").modal('show');
}
But I need it to stop the execution of the code when the modal is opened, and only continue when it is closed, in this way it executes the code after it opens the normal modal, exact same is in a desktop project, only than in ASP.NET. How can I proceed?
Explanation edit. I am going to make a password request, for example such a user will delete, but he can only delete with the admin password, I need to check if the password confers, and if the password check continue the code execution:
if (senha.existesenha == 1) {
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "myModal", "$(function() {openModalExclusao();});", true);
if (senha.confere == 1) {
clsdb.ExecutaSQL("delete musculos where id =" + ID);
}
}
Except for the return of the checks, it continues the code and does not execute the delete. As the return of the checks, it is on the modal button click.