Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
Hi, yes by casting the block to IContent
var content = myBlock as IContent;
if (content != null)
{
var name = content.Name;
}
Or do you mean the type's displayname?
var repo = ServiceLocator.Current.GetInstance<BlockTypeRepository>();
var blockType = repo.Load<T>();
return blockType.DisplayName;
How can I get the displayname of a block in code?