locked
changing color problem in user control RRS feed

  • Question

  • User1367540698 posted


    how to change the backgroung color and foreground color of table and div tag while making a Color property.

    how to?

    i am trying like this.

    public Color BackGroundChange
    {
    	
    	set
    	{
    		table1.BGColor = value
    	}
    	get{return table1.BGColor }
    } 
    
    public Color BackGroundChangeDiv
    {
    	
    	set
    	{
    		div. = value   ??????????????????????????????//
    	}
    	get{return div. }   ??????????????????????
    
    } 


    i try to cart it but it fail.

    and how to change the foreground color of these ?

    Monday, July 27, 2009 5:31 AM

Answers

  • User541108374 posted

    Hi,

    either you replace the div tag with a Panel control and set its color. Or, make the div element an htmlcontrol (generichhtmlcontrol) by adding the runat="server" and an ID="..." attribute.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 27, 2009 7:17 AM