chaleastale
asked on
I want to change the forecolor of an html text box at the code behind where its runat ="server" property set to true.
I want to change the forecolor of an html text box at the code behind where its runat ="server" property set to true.
How to do that?
any help is appreciated.
tx
How to do that?
any help is appreciated.
tx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I couldn't find Style.Add on c# it is Attributes.Add. What about to change the forecolor?
Here is code in C#:
TextBox1.Style.Add("color" ,"red"); - text in textbox (forecolor) will have such color
TextBox1.Style.Add("backgr ound-color ","green") ; - background of textbox will have such color
TextBox1.Style.Add("color"
TextBox1.Style.Add("backgr
don't forget to put it into cs:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls ;
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls
here is example in VB.Net to do it in code-behind: myTextBox.Style.Add("backg
in C# it is the same.