Solved

Set Textbox Background color ASP.NET 2.0

Posted on 2011-09-28
3
452 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

679 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