AI OnAI Off
DesignMode only returns true while editing the control in Visual Studio, which has nothing to do with EPiServer. Is that really want you want to check? Or do you want to see if the page or block is in edit mode? In that case you have:
if (EPiServer.Editor.PageEditing.PageIsInEditMode) { }