Tôi đã tạo động HyperLink
. Và tôi muốn thay đổi màu sắc bằng cách thêm mã màu.ForeColor với mã màu
HyperLink hpl = new HyperLink();
hpl.Text = "SomeText";
hpl.ForeColor = "#5BB1E6";
//Cannot implicitly convert type 'string' to 'System.Drawing.Color
Nhưng tôi không thể.
Cách thêm mã màu vào ForeColor
?
Có thể không?
Có lẽ bạn cần [ 'ColorTranslator.FromHtml'] (http: //msdn.microsof t.com/en-us/library/system.drawing.colortranslator.fromhtml.aspx) – V4Vendetta
Cảm ơn ông @ V4Vendetta – OammieR