Custom Web Control & Property Pages

D

dm_dal

I'm building a custom web control and was looking at was to add css style
attributes to my tags. Can I implement a "Style Builder" for my custom
control?

I tried creating a property in my control (C#)

<snippit>

private CssStyleCollection _style;

[Browsable(true),Category("Appearance")]
public CssStyleCollection Style
{
get
{
return _style,
}
set
{
_style = value;
}
}

When I place the control on an aspx page, the Style attribute in the design
properties page is greyed out. When I right click on the placed control,
the context menu show the "Build Styles" menu item, but it too is greyed
out.

Is there a way to do this?
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top