IRootDesigner in ASP.NET

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
 
A

Andrew

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
 
A

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top