change textbox colors in code

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

On my update screen i want to change the textbox color to Yellow only if the
field is editable.
How can i do that within code?

thx
 
In the PageLoad event, you can do

if(textbox.readonly)
textbox.backcolor = Color.gray;
else
textbox.backcolor = Color.yellow;
 
Back
Top