• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

change background color of textbox in code behind using a number

How can I change the background color to a specific color in the code behind. Currently I can only set it to pre-defined colors . for instance


myTextbox.BackColor = Color.LightSalmon.

I want to set the background color in the code behind to #F0FFF0
0
dotnet22
Asked:
dotnet22
  • 3
  • 2
1 Solution
 
fehaCommented:
Here are some samples how to change colors on form elements with JS

http://www.webreference.com/js/tips/991130.html

and here with css

http://www.sitepoint.com/article/style-web-forms-css
0
 
AutogardCommented:
Give this a try...

Color myColor = ColorTranslator.FromHtml("#F0FFF0");
myTextbox.BackColor = myColor;
0
 
fehaCommented:
also solution needs to work with php4 and php5

add actions, remove actions and priority order ...
there should be stored in an array more functions with respective order of execution

just by calling particular tag in that array and possibility to store arguments for each ...
0
 
fehaCommented:
sorry wrong post
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now