Try our conversational search powered by Generative AI!

Disable right click menu on certain page types


Good morning,

I'd like to disable the right click menu on certain page types. Is this possible? The only source I've got on the topic is this one but it doesn't clear things out for me.

Sep 14, 2010 8:09

In the page template, I think you should be able to use the OnInit or OnLoad event handler or similar to set ContextMenu.IsMenuEnabled = false.

Sep 14, 2010 8:34
Sep 14, 2010 8:36

Sounded like that would do the trick but it didn't.

Sep 14, 2010 9:19

Inheriting from SimplePage doesn't do the trick?

Sep 14, 2010 10:41

This will solve your problem

protected override void OnPreInit(EventArgs)
{ ContextMenu.IsMenuEnabled = false; base.OnPreInit(e); }




Edited, Apr 06, 2011 11:12
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.