Using ParseControl at Design-Time

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Everyone!

I'm currently building a control, that should display content defined by an
xml-description file.
The control is running perfectly at runtime.
However, while designing the pages, containing controls of this type, the
control does not render the content assigned to it.
There is a null-reference axception being thrown, when the control calls the
pages ParseControl-Method.
It's not the page being null, but the templateparser (or alike).
I tried instantiating my own instance of System.Web.UI.Page, when in
design-time, but this failed.
I then found a reference to a method calles DesignerInitialize() (which is
hidden in Intelli-Sense, but available). This should initialize everything
the page needs in order to parse the controls - but it didn't.

Is there any way to use parse-controls in design-time or not?
One should believe there is a way - any hints?

TIA

- Kristof


.



Relevant Pages

  • Re: Update property from within a control
    ... design-time code) the Control's certain property at design-time (only once ... this, we need to provide a custom ControlDeisgner for our control, and in ... | Subject: Re: Update property from within a control ... | generating a GUID when it is first added to a form at design time. ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: Update property from within a control
    ... > design-time code) the Control's certain property at design-time (only ... > this, we need to provide a custom ControlDeisgner for our control, and in ... > GuidControl gc = this.Component as GuidControl; ... > | Subject: Re: Update property from within a control ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • RE: Problem writing a control with DataSource support...
    ... it just use the following code to retreive the datasource ... And we bind the retrieved source or related dataobjects to the control as ... For design-time, that'll be much more complex, since the Design-time ... support for DataBound control in asp.net 2.0 introduce many new design-time ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Dynamic control state changes lost on Postback
    ... If you want to set something design-time specific, ... Setting a custom control's properties for display in DesignMode ... This goes woth what the control has set as property values. ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: Update property from within a control
    ... Steven Cheng ... Microsoft Online Support ... | Subject: Re: Update property from within a control ... |> design-time code) the Control's certain property at design-time (only ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)