K
Ken Baltrinic
I am writing a control that inherits from WebControl. It will be rendered
as a text box, image, and an iframe wrapped in span. Now here is my
problem. I want to render the entire contents more or less myself (i.e
override the Render method) for reasons to complex to explain here.
Everything I want to do is straight forward except for one item. My control
inherits all sorts of standard at WebControl properties, especially the ones
encapsulated in the ControlStyle property. Is there a method somewhere that
will convert the ControlStyle property to the appropriate string (i.g.
"style=\"height: 20px; width:75px\"" or perhas a method that I pass a
writter to and a style and it will call the AddAttribute() method, or
something of this sort. Basically I am trying to avoid coding a method to
build the style attribute from scratch.
as a text box, image, and an iframe wrapped in span. Now here is my
problem. I want to render the entire contents more or less myself (i.e
override the Render method) for reasons to complex to explain here.
Everything I want to do is straight forward except for one item. My control
inherits all sorts of standard at WebControl properties, especially the ones
encapsulated in the ControlStyle property. Is there a method somewhere that
will convert the ControlStyle property to the appropriate string (i.g.
"style=\"height: 20px; width:75px\"" or perhas a method that I pass a
writter to and a style and it will call the AddAttribute() method, or
something of this sort. Basically I am trying to avoid coding a method to
build the style attribute from scratch.