Web Custom Control Designer

V

VR

Hi, I'm developing a Web Custom Control and following the MSDN walkthroughs
I got a little confused about one thing using the designer class:

In the sample it shows how to render some label text using <h1> to make it
bigger but when I run the sample the <h1> is left in the designer, it do not
get to my web page (ok, that should be the behavior)

My question is: do I need to put inside the designer class just the output I
want to use in Design mode and all I want to use both in design and run-time
modes in the Render method? Or is there a way to propagate the designer
behavior to the web page? (like accessing the designer properties and output
in the render method?)


thanks in advance,
Victor
 
R

Robert Koritnik

My answer is:
Normally when creating your own custom control designer you make somehow
different rendering methods. Probably you don't have the correct look and
feel of the control in design time so there is actually no need to create a
"fully blown" runtime rendering at designtime.
Normally you just display the control and make any template editors and so
on and if it's databound custom control you bind to some dummy data or just
a few records from the design time binded datasource.

Anyway. Why make the same rendering at design time?

the control itself could maybe get the information of it's designer class
(never done that, but if the VSE can, why the control couldn't), but it's
probably better to make rendering in the control itself and get it via
designer.component property.

Robert.
 

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,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top