Javascript:
function ConfirmIt() {
var x = confirm("Do you Want to Delete The Point ??");
var control = '<%=inpHide.ClientID%>';
if (x == true) {
document.getElementById(control).value = "1";
} else {
document.getElementById(control).value = "0";
}
}
后面的代码:
ScriptManager.RegisterStartupScript(Page, GetType(), "JsStatus", "ConfirmIt();", true);
int DiagResult = int.Parse(inpHide.Value);
if (DiagResult == 1)
{
// db.delete_Geo_Routepoints(userid);
}
我希望能够仅从后端调用 JavaScript 代码,但我目前拥有的代码无法这样做。我应该如何获得价值?