Solved

Set Textbox Background color ASP.NET 2.0

Posted on 2011-09-28
3
447 Views
Last Modified: 2012-05-12
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
Comment
Question by:ASPDEV
3 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 36718192
You should be able to set the background color simply like :

txtLastName.BackColor = System.Drawing.Color.White
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 36718408
add style to that page
<style>
#input{ background: ur color;}
</style}
0
 

Author Closing Comment

by:ASPDEV
ID: 36718421
Thanks.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
DLL in ASP.NET 20 44
asp syntax 3 24
Achieve json result 2 34
Different Delete Messages 7 17
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now