Bruce,
The issue I've come across with this - beside the fact that the property
doesn't exist in the ASP.NET 1.1 Framework -- is that if you have a
ServerControl that relies on the HttpContext to render it's DesignTimeHtml
(such as making an HttpWebRequest) then it would blow up in the designer even
though functioning perfectly well at runtime. Rick's blog post which I
referenced below solves this problem.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Bruce Wood" wrote:
>
> Nicholas Paldino [.NET/C# MVP] wrote:
> > Your component has to be derived from the Component class. From that,
> > you can check the DesignMode property. If it is true, then you are in
> > design mode, false otherwise.
>
> I should add that DesignMode is set only after your control has a
> context handle in the designer, so in your constructor code it will
> always be false, whether you are in the designer or not.
>
> If there is code that you don't want run in design mode then you should
> put it in your OnLoad method, where the DesignMode property does have a
> valid value.
>
>