5

I have a webpart in a page and I need to know how I can determine if the page is currently in edit mode. For example: if(Page.IsInEditMode).

Any help?

Shaz
  • 15,637
  • 3
  • 41
  • 59
Leonardo
  • 10,737
  • 10
  • 62
  • 155

1 Answers1

5

Have a look at the class System.Web.UI.WebControls.WebParts.WebPartManager

It has an EditDisplayMode property that represents the display mode in which end users can edit and modify server controls. See doc here

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298