javascript - confirmation popup message (ASP.NET/VB) -


i want have confirmation message box pop when user clicks cancel button on form. believe correct javascript code:

function confirmation() {         var answer = confirm("are sure want cancel? information have entered discarded.")         if (answer) {             window.location = "index.htm";         }     } 

but, i'm not sure how can call function vb code behind page.

on cancel button add markup attribute

onclientclick="return confirmation();" 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -