How to know that we are in edit mode
Hi
I whant to show diferent contents in my widget dependig if it is at editing mode or not.
I found a way by finding "Action/Edit" in the RawUrl of the request, but i don't think that's the correct way to do-it and
this
.DesignMode
// always return false
Hi Paulo,
Try using IsDesignMode. This is a control extension.
IsDesignMode is extension static method which determines whether the control is in Sitefinity design mode - you are editing a page. There are also
Hi,
I forgot to say that i am in a SimpleView derived class and I cannot find those properties.
I had searched, but didn't found any property related.
thanks.
Hi Paulo,
You can use these extensions in a custom widget. Most probably you do not have some reference added to the class you have created
sample
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
Telerik.Sitefinity.Web.UI;
using
System.Web.UI;
namespace
Telerik.Sitefinity.Samples
public
class
SimpleViewCustom : SimpleView
protected
override
void
InitializeControls(GenericContainer container)
if
(
this
.IsDesignMode())
protected
override
string
LayoutTemplateName
Thank you,
I am used to clean the unused references... thats why i dind have the extensions.