Data Browser - Viewing Site  Sector 23 Code Bank Logged in as:  Guest  




           


DesignMode is always false in a Custom Server Control
It may seem that DesignMode is always false in a Custom Server Control.
This is because the DesignMode flag is not set until the control's OnInit is called, and you may be trying to use it earlier, such as in a constructor.

Workaround:
Use the following instead:
if (System.ComponentModel.LicenseManager.CurrentContext.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime)
... in design mode

Created By: amos 3/26/2014 2:33:27 PM