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

Set Textbox Background color ASP.NET 2.0

Hello Experts,

I have a simple task, I'm changing the background color of the textbox on condition. If my condition fails , I need set the default text background color for the text box.

How can I get that, while debugging I seen the textbox properties. It shows:

"{Name=0, ARGB=(0, 0, 0, 0)}".

Whether I can set this value to textbox property and get the default background color.
0
ASPDEV
Asked:
ASPDEV
1 Solution
 
Paul JacksonSoftware EngineerCommented:
You should be able to set the background color simply like :

txtLastName.BackColor = System.Drawing.Color.White
0
 
Ramkisan JagtapLead DeveloperCommented:
add style to that page
<style>
#input{ background: ur color;}
</style}
0
 
ASPDEVAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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