Note that the IsDesignTime accepts a System.Web.UI.Page type variable.
~~~~~~~~~~~~~~~~~~~~~~~~~
class function Common.IsDesignTime(Page: System.Web.UI.Page): boolean;
begin
if NOT Assigned(Page) then
begin
Result := True;
Exit;
end;
if Assigned(Page.Site) then
begin
Result:= Page.Site.DesignMode;
Exit;
end;
Result := False;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Also, note that this is a class function defined in the class named "Common".
An example of usage:
procedure myWebControl.OnInit(e: EventArgs) ;
begin
inherited;
if not Common.IsDesignTime(Page) then
Page.RegisterRequiresPostBack(self) ;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» How to locate and highlight a string in TWebBrowser
« Installing the BDE (manually or using an install program)

