这样的事情可能吗?
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "Confirm", "x()", true);
if (hid.Value != null)
{
}
else
{
}
function x() {
var message = confirm("Are you sure you want to continue ?");
if (message == true) {
document.getElementById("hid").value = "1";
}
else {
document.getElementById("hid").value = "0";
}
}