dotnetnukedotnetnuke-9

How to detect if Edit Mode is enabled on the server side in DNN 9?


How can I detect if DNN is in Edit Mode in the Back-End code?

I looked at this link, but it seems to deal with DNN7 on the Client-Side: http://www.dnnsoftware.com/answers/dnn7-detect-page-edit-mode-in-js

For example:

if(DotNetNuke.EditMode == true){
// Do Something
}

Solution

  • PortalModuleBase has an IsEditable property that is true when in Edit Mode.

    if(IsEditable){
     // Do Something
    }