P
PV
Like many others, I would like to replace the default "grey button" display
of my user control with something that more closely (better yet exactly)
resembles the runtime display of the control.
In an attempt to do just this, I created my own designer class for my
"Header" user control. For now, the designer just returns "<h1>Page
Header</h1" from the GetDesignTimeHtml() method. Then I added the Designer
attribute to the class definition for my Header user control's code-behind.
There is no effect in the designer.
I did a google search on this group, and have found suggestions, but not a
confirmation that it is not possible to specify a designer for a user
control. Can anybody confirm this for me? I don't see why it shouldn't
work. Other than a "code in-front" page, what is the difference between a
user control and a server control? They are just classes! Is it just
laziness on the part of Microsoft? Or is there a real issue here?
I would just avoid the situation and create a server control instead,
however the very nature of my Header is such that I would like graphic
designers to be able to modify it any time they want. Obviously a user
control is what I need.
I considered just wrapping my user control with a server control, but ...
yeach. I don't want to go there.
Suggestions?
of my user control with something that more closely (better yet exactly)
resembles the runtime display of the control.
In an attempt to do just this, I created my own designer class for my
"Header" user control. For now, the designer just returns "<h1>Page
Header</h1" from the GetDesignTimeHtml() method. Then I added the Designer
attribute to the class definition for my Header user control's code-behind.
There is no effect in the designer.
I did a google search on this group, and have found suggestions, but not a
confirmation that it is not possible to specify a designer for a user
control. Can anybody confirm this for me? I don't see why it shouldn't
work. Other than a "code in-front" page, what is the difference between a
user control and a server control? They are just classes! Is it just
laziness on the part of Microsoft? Or is there a real issue here?
I would just avoid the situation and create a server control instead,
however the very nature of my Header is such that I would like graphic
designers to be able to modify it any time they want. Obviously a user
control is what I need.
I considered just wrapping my user control with a server control, but ...
yeach. I don't want to go there.
Suggestions?