使用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代码,但我目前拥有的代码无法执行此操作。我该如何获得价值?
答案 0 :(得分:0)
Javascript是客户端代码,无法在Code behind
上输出