IRootDesigner in ASP.NET

  • Thread starter Thread starter Mihail Luca
  • Start date Start date
M

Mihail Luca

Hi !
After the first researches I found out that with WebForms there is no easy
way to implement an IRootDesigner.
After inspecting the Web.UI.Page class I have found that it uses these
attribute:
[ DesignerAttribute(typeof(
Microsoft.VSDesigner.WebForms.WebFormDesigner) ),
System.ComponentModel.DesignerCategoryAttribute("ASPXCodeBehind"),
System.ComponentModel.DefaultEventAttribute("Load"),
System.ComponentModel.ToolboxItemAttribute(false)]

My ideea was to inherit from Web.UI.Page, and to put my own Designer
attribute instead of the default one. I have tried to derive from the
WebFormDesigner, but it doesn"t work. It doesn"t call even the constructor.

Does anyone has the smallest ideea how can i enter in the design time chain
of the Page object ?

Thank you,
Mihail
 
I haven't seen many threads on this subject so I did a test.

The constructor doesn't get called, but I noticed that if you change the
DefaultEventAttribute To PreRender instead of load, you will see the
behavior change in VS.
Double clicking on the page to get to code view generates the Page_PreRender
so some of the stuff has an effect.

-Andrew
 
Sorry all,
To quick on the reply,I didn't see the long list of groups in the "to"
I didn't mean to crosspost the reply.

I am however intentionaly cross posting this message

-Andrew

Andrew said:
I haven't seen many threads on this subject so I did a test.

The constructor doesn't get called, but I noticed that if you change the
DefaultEventAttribute To PreRender instead of load, you will see the
behavior change in VS.
Double clicking on the page to get to code view generates the Page_PreRender
so some of the stuff has an effect.

-Andrew




Mihail Luca said:
Hi !
After the first researches I found out that with WebForms there is no easy
way to implement an IRootDesigner.
After inspecting the Web.UI.Page class I have found that it uses these
attribute:
[ DesignerAttribute(typeof(
Microsoft.VSDesigner.WebForms.WebFormDesigner) ),
System.ComponentModel.DesignerCategoryAttribute("ASPXCodeBehind"),
System.ComponentModel.DefaultEventAttribute("Load"),
System.ComponentModel.ToolboxItemAttribute(false)]

My ideea was to inherit from Web.UI.Page, and to put my own Designer
attribute instead of the default one. I have tried to derive from the
WebFormDesigner, but it doesn"t work. It doesn"t call even the constructor.

Does anyone has the smallest ideea how can i enter in the design time chain
of the Page object ?

Thank you,
Mihail
 
Back
Top