Hello, I have a project in ASP .NET with C#, I have a form to change the password, and for this I have a modify button in which, when I click on it, it should show me a modal where a message appears that the password has been modified. and a button where you must click on accept and the session must be closed. This is my code:
protected void btnModificar_Click(object sender, EventArgs e)
{
Modificar();//funcion para modificar
//string para mostrar mi modal
string modalScript = @"<script type=""text/javascript"">
function openModal() {
$('#mymodal').modal('show');
}
</script>";
ScriptManager.RegisterStartupScript(this, GetType(), "bsChgPwdModal", modalScript, false);//
}
if it shows me the modal but then "disappears" and I want it to stay there to click the button and close the session. Thank you!! Cheers
If you use bootstrap, do it directly in Html and then trigger it on click and capture data on close.
I'll give you an example code.
Open Modal
Example link: https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_modal&stacked=h