i want to change back color of user controls named UserTextBox1
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Suthish NairRank #92 · 22.8K reputationPosted Oct 7, 2010, 12:34 PM EDT
((TextBox)UserControl1.FindControl("UserTextBox1")).BackColor = "Red";
or,
((TextBox)UserControl1.FindControl("UserTextBox1")).BackColor = System.Drawing.Color.Name.Red;
If using MasterPage then,
((TextBox) ((UserControl) this.Master.FindControl("UserControl1")).FindControl("UserTextBox1")).BackColor = "Red";
Shailendra Verma47 reputationPosted Oct 8, 2010, 5:35 AM EDT
Suthish NairRank #92 · 22.8K reputationPosted Oct 8, 2010, 6:57 AM EDT