M
magnus
Hi,
Hoping someone can help me.
I´m building a composite control and there is one thing I haven't
figured out.
What I want to do is to set a css class, specified in the properties,
onto a div tag, that is rendered as LiteralControl (in the
CreateChildControls() method).
This div tag surrounds my control and is ment to set the base css class
for it (then I have sub css classes for the content)
I cant get to the css property in this method, as I need to do that in
OnPreRender(...)
Controls.Add( new LiteralControl( "<div id=\"baseTag\" class=\"???\"" )
);
// ... some other contols
Controls.Add( new LiteralControl( "</div>" ) );
One way to add div tags is to instanciate a panel, and then setting the
CssClass for it in OnPreRender. But then I would not have the closing
div tag at the end.
Any help would be appreciated,
thanks,
Magnus
Hoping someone can help me.
I´m building a composite control and there is one thing I haven't
figured out.
What I want to do is to set a css class, specified in the properties,
onto a div tag, that is rendered as LiteralControl (in the
CreateChildControls() method).
This div tag surrounds my control and is ment to set the base css class
for it (then I have sub css classes for the content)
I cant get to the css property in this method, as I need to do that in
OnPreRender(...)
Controls.Add( new LiteralControl( "<div id=\"baseTag\" class=\"???\"" )
);
// ... some other contols
Controls.Add( new LiteralControl( "</div>" ) );
One way to add div tags is to instanciate a panel, and then setting the
CssClass for it in OnPreRender. But then I would not have the closing
div tag at the end.
Any help would be appreciated,
thanks,
Magnus