Disable right click menu on certain page types

Vote:
 

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.

http://world.episerver.com/Templates/Forum/Pages/thread.aspx?id=24048

#43094
Sep 14, 2010 8:09
Vote:
 

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.

#43095
Sep 14, 2010 8:34
Vote:
 
#43096
Sep 14, 2010 8:36
Vote:
 

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

#43097
Sep 14, 2010 9:19
Vote:
 

Inheriting from SimplePage doesn't do the trick?

#43105
Sep 14, 2010 10:41
Vote:
 

This will solve your problem

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

    

/Stefan

   

#49947
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.