Click here to Skip to main content
15,896,344 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi
i call bootstraps modal from code-behind,my code:

C#
Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", "initMyModal('" + timeRemain + "');", true);


in aspx page:

JavaScript
function initMyModal(timeRemain) {
        $(".modal-body").html(timeRemain);
        $('#myModal').one().modal('show');
}


my problem is when user click on button back in browser and then click forward the modal
displayed again.

how can perevent of display modal when users click on forward button in browser

thanks for your help
Posted
Comments
ZurdoDev 8-Jul-14 12:32pm    
Clicking forward reloads your page so why don't you want it to run again?
jiji2663 9-Jul-14 0:07am    
because this modal appear when user click on save button

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900