I have the below function in asp.net
function Confirm() {
var confirm_value = document.createElement("INPUT");
confirm_value.type = "hidden";
confirm_value.name = "confirm_value";
if (confirm("Do you want to save data?")) {
confirm_value.value = "Yes";
} else {
confirm_value.value = "No";
}
document.forms[0].appendChild(confirm_value);
}
Now, I need to call this function confirm in the code file. Note: I have the design in page: *.aspx while I have the code in aspx.cs. How can I call it in aspx.cs while I write this function in aspx file.