Prev: Upgradeing a published website using ftp. Many questions
Next: ASP.NET Server controls application root operator resolves to server root
From: DavidC on 11 Jun 2010 18:13 I have a ListView control where I am building and formatting labels in a footer row. I am using the .ToString() method and would like to have negative dollar amounts show in red. My code for setting the labels are as follows. Thanks. lbl.Text = (dblBudgetMo7 - dblExpMo7).ToString("c") -- David
From: Iv on 12 Jun 2010 02:18
DavidC wrote: > I have a ListView control where I am building and formatting labels in a > footer row. I am using the .ToString() method and would like to have > negative dollar amounts show in red. My code for setting the labels are as > follows. Thanks. > > lbl.Text = (dblBudgetMo7 - dblExpMo7).ToString("c") > if (dblBudgetMo7 - dblExpMo7 < 0) label1.ForeColor = Color.Red; |