Changing properties of a custom control in code-behind

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I've written a web server custom control. If it's attributes are set at
design time in the HTML it works fine. But I want to also be able to
dynamically change some of the properties in the code behind file. Is there
any way to do this? When I write the code for the button_click event to set
the properties, the control doesn't render with the changed properties the
way it should.

Any ideas?

Philip
 
Use this:
Control1.Attributes.Add("left","10");
put this in the page load. Any html attribute would follow that same format.
When the control renders clientside, these settings override the default.
regards
 
Back
Top