<asp:Button runat="server" ID="btnUserDelete" Text="Delete" CssClass="GreenLightButton"
OnClick="BtnUserDelete_Click"
OnClientClick="return UserDeleteConfirmation();"
meta:resourcekey="BtnUserDeleteResource1" />
我试过了:
function UserDeleteConfirmation() {
if (confirm("Are you sure you want to delete this user?"))
return true;
else
return false;
}
和
function UserDeleteConfirmation() {
if (confirm("Are you sure you want to delete this user?")) {
__doPostBack(btnUserDelete, '');
}
return false;
}
而且它们都不起作用。