my Umbraco version is 4.0.3.
public class MemberEventHandler : ApplicationEventHandler
{
public MemberEventHandler()
{
Member.BeforeSave += new Member.SaveEventHandler(Member_BeforeSave);
}
void Member_BeforeSave(umbraco.cms.businesslogic.member.Member sender, umbraco.cms.businesslogic.SaveEventArgs e)
{
e.Cancel = true;
var clientTool = new ClientTools((Page)HttpContext.Current.CurrentHandler);
clientTool.ShowSpeechBubble(SpeechBubbleIcon.Success, "Error", "GroupName doesn't exist.");
}
}
Now, I can cancel the save action by setting e.Cancel to true, but the Umbraco's bubble still show "Member Saved" on the page. I try the clientTools, but it can't work.
Could I customize the message in the bubble? Or show the Umbraco's error bubble?
I have searched the problem in forum and stackoverflow, but no answer.
I have a feeling that in later v4 versions, it shows a message if the event was cancelled, but you can't customise it. In that particular version though (which is super old), I think you still get the message, even if you cancel it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.