在asp.net C#页面后面的代码中更改字体颜色 [英] changing font color in code behind page of asp.net c#
本文介绍了在asp.net C#页面后面的代码中更改字体颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尊敬的专家!
我正在文本框内使用下面的文本,我需要将此文本的颜色更改为浅灰色.顺便说一下,我用这段文字来搜索记录.
这是代码..,位于asp.net C#
页面后面的代码中
Dear Experts !!
Am using this below text Inside of Textbox, and i need to change the color of this text to light gray Color. By the way i used this text to search the records.
this is the code.., in code behind page of asp.net C#
txtSearch.Attributes.Add("value", "Search HNumber, SId, RoomNo, to Narrow the Results.....");
请谁能建议我该怎么做? ?
谢谢,
Please can anyone suggest me to how to do this ? ?
Thanks,
推荐答案
有关:
TextBox1.Text = "Some content colored";
TextBox1.ForeColor = System.Drawing.Color.LightGray;
TextBox1.ForeColor = System.Drawing.Color.LightGray;
这篇关于在asp.net C#页面后面的代码中更改字体颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文