diff --git a/DNN Platform/Website/DesktopModules/Admin/Security/DataConsent.ascx.cs b/DNN Platform/Website/DesktopModules/Admin/Security/DataConsent.ascx.cs index 9ff920fa691..597a19bda2f 100644 --- a/DNN Platform/Website/DesktopModules/Admin/Security/DataConsent.ascx.cs +++ b/DNN Platform/Website/DesktopModules/Admin/Security/DataConsent.ascx.cs @@ -142,7 +142,7 @@ protected override void OnLoad(EventArgs e) $"document.getElementById({HttpUtility.JavaScriptStringEncode(this.cmdSubmit.ClientID, addDoubleQuotes: true)}).disabled = !this.checked;"); this.cmdDeleteMe.Attributes.Add( "onclick", - $"if (!confirm({HttpUtility.JavaScriptStringEncode(this.DeleteMeConfirmString, addDoubleQuotes: true)})) this.preventDefault();"); + $"if (!confirm({HttpUtility.JavaScriptStringEncode(this.DeleteMeConfirmString, addDoubleQuotes: true)})) event.preventDefault();"); } private void CmdCancel_Click(object sender, EventArgs e)