Click here to Skip to main content
16,016,290 members
Home / Discussions / C#
   

C#

 
PraiseRe: Converting List<int> to List<object> for One to Many relation with sqlite-net-extensions Pin
Eddy Vluggen10-Mar-20 1:44
professionalEddy Vluggen10-Mar-20 1:44 
GeneralRe: Converting List<int> to List<object> for One to Many relation with sqlite-net-extensions Pin
Eddy Vluggen9-Mar-20 2:23
professionalEddy Vluggen9-Mar-20 2:23 
GeneralRe: Converting List<int> to List<object> for One to Many relation with sqlite-net-extensions Pin
Exoskeletor9-Mar-20 0:26
Exoskeletor9-Mar-20 0:26 
QuestionHow do I make table data red in <td>? Pin
Member 114033044-Mar-20 8:33
Member 114033044-Mar-20 8:33 
AnswerRe: How do I make table data red in <td>? Pin
Richard Deeming4-Mar-20 8:50
mveRichard Deeming4-Mar-20 8:50 
GeneralRe: How do I make table data red in <td>? Pin
Member 114033044-Mar-20 8:59
Member 114033044-Mar-20 8:59 
GeneralRe: How do I make table data red in <td>? Pin
Richard Deeming4-Mar-20 23:58
mveRichard Deeming4-Mar-20 23:58 
GeneralRe: How do I make table data red in <td>? Pin
Member 114033049-Mar-20 4:36
Member 114033049-Mar-20 4:36 
Thank for your help on trying to figure this out. I did add css class to existing css file.
CSS
.inactiveAttorney
{
    color: #AD0000;
    font-weight:bold
}


The product owner have asked me to only make the attorney name red when fActive = 0 (false). The code behind have this code
C#
private bool _fActive;
public bool fActive
{
   get { return this._fActive; }
   set { this._fActive = value; }
}
this._fActive = parsefActive == true ? true : false; //This is how it is called or populated


I have successfully been able to use css class to make attorney name red. However, I need help to add a condition so that the name is red only when fActive =false (0).

Here is my code which is working and needs adding condition
"<table><tr><td class='inactiveAttorney'>" + Eval("AttorneyFullName") + "</td></tr></table>"


The fActive is a Boolean and else where in the code I see something done when a Boolean is true. I need to do something similar but I do not know how.
Here is that example.
C#
<tr><td><%# (bool)Eval("PartyConfidentialHomePhone") == true ? "<img src=\"../../Images/YellowLock_16x16.png\" alt=\"Home Phone Secured\" />":"" %><%#Eval("PartyHomePhone").ToString() != "" && Eval("PartyHomePhone") != null ? "" + Eval("PartyHomePhone") + "":string.Empty%></td></tr>


modified 9-Mar-20 13:29pm.

GeneralRe: How do I make table data red in <td>? Pin
Richard Deeming9-Mar-20 8:36
mveRichard Deeming9-Mar-20 8:36 
GeneralRe: How do I make table data red in <td>? Pin
Member 114033049-Mar-20 9:41
Member 114033049-Mar-20 9:41 
GeneralRe: How do I make table data red in <td>? Pin
Richard Deeming9-Mar-20 9:53
mveRichard Deeming9-Mar-20 9:53 
GeneralRe: How do I make table data red in <td>? Pin
Member 114033049-Mar-20 11:45
Member 114033049-Mar-20 11:45 
GeneralRe: How do I make table data red in <td>? Pin
Richard Deeming10-Mar-20 0:14
mveRichard Deeming10-Mar-20 0:14 
GeneralRe: How do I make table data red in <td>? Pin
Member 1140330412-Mar-20 4:08
Member 1140330412-Mar-20 4:08 
QuestionHow to capture credentials / auth token from Windows credential popup dialog? Pin
S p k 5214-Mar-20 0:27
S p k 5214-Mar-20 0:27 
AnswerRe: How to capture credentials / auth token from Windows credential popup dialog? Pin
Richard MacCutchan4-Mar-20 0:37
mveRichard MacCutchan4-Mar-20 0:37 
GeneralRe: How to capture credentials / auth token from Windows credential popup dialog? Pin
S p k 5214-Mar-20 2:03
S p k 5214-Mar-20 2:03 
Questionforeach loop behavior C# Pin
picasso22-Mar-20 18:55
picasso22-Mar-20 18:55 
AnswerRe: foreach loop behavior C# Pin
Pete O'Hanlon2-Mar-20 20:17
mvePete O'Hanlon2-Mar-20 20:17 
AnswerRe: foreach loop behavior C# Pin
OriginalGriff2-Mar-20 20:23
mveOriginalGriff2-Mar-20 20:23 
AnswerRe: foreach loop behavior C# Pin
lmoelleb3-Mar-20 23:01
lmoelleb3-Mar-20 23:01 
QuestionIgroupping with Parallel Pin
Member 110035101-Mar-20 6:58
Member 110035101-Mar-20 6:58 
AnswerRe: Igroupping with Parallel Pin
Dave Kreskowiak1-Mar-20 7:39
mveDave Kreskowiak1-Mar-20 7:39 
GeneralRe: Igroupping with Parallel Pin
Member 110035101-Mar-20 7:46
Member 110035101-Mar-20 7:46 
GeneralRe: Igroupping with Parallel Pin
Dave Kreskowiak1-Mar-20 7:50
mveDave Kreskowiak1-Mar-20 7:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.