High-level question about ASP.NET web controls..

  • Thread starter Thread starter RCS
  • Start date Start date
R

RCS

I'm a bit of a noob when it comes to web controls... What I want to do, is
create web control that appears in the toolbox, that one could drag onto a
web page - and you'd see the actual control (e.g. what it will look like on
the resultant web page).

If I use a "user control", it puts that grey box describing the control, and
you need to imagine what it will look like (yipee!)!

If I create a seperate "web control" project, and it creates the default
"WebCustomControl1.cs" - that adds to the toolbox, but just displays text.
And after scouring the net, looks like you'd need to manually create your
controls in text, which doesn't sound right.

Shouldn't I be able to WYSIWYG a control (and add my code behind it) and
make that available via the toolbox? The main thing I want is to see it in
design-time, and be able to manipulate the public properties...

What am I missing? Thanks!
 
What you're missing is the System.Web.UI.Design.ControlDesigner class.
There are samples in the Framework SDK and MSDN. The ControlDesigner class
lets you specify the HTML that is rendered to the designer when you drop a
control on the web page.

HTH

Dale Preston
MCAD, MCDBA, MCSE
 
Back
Top