[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 474
  • 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 JacksonCommented:
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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