Click here to Skip to main content
15,844,155 members
Home / Discussions / C#
   

C#

 
GeneralRe: Preventing Tread Starvation - Best Practices Pin
Foothill15-Nov-13 15:18
professionalFoothill15-Nov-13 15:18 
GeneralRe: Preventing Tread Starvation - Best Practices Pin
jschell18-Nov-13 9:26
jschell18-Nov-13 9:26 
Questiondatalist itemtemplete control at server side Pin
MichaelCheong8914-Nov-13 23:27
MichaelCheong8914-Nov-13 23:27 
AnswerRe: datalist itemtemplete control at server side Pin
Nicholas Marty15-Nov-13 0:24
professionalNicholas Marty15-Nov-13 0:24 
GeneralRe: datalist itemtemplete control at server side Pin
MichaelCheong8915-Nov-13 0:48
MichaelCheong8915-Nov-13 0:48 
GeneralRe: datalist itemtemplete control at server side Pin
Pete O'Hanlon15-Nov-13 0:57
subeditorPete O'Hanlon15-Nov-13 0:57 
GeneralRe: datalist itemtemplete control at server side Pin
Nicholas Marty15-Nov-13 1:06
professionalNicholas Marty15-Nov-13 1:06 
GeneralRe: datalist itemtemplete control at server side Pin
Nicholas Marty15-Nov-13 1:05
professionalNicholas Marty15-Nov-13 1:05 
You need to call the FindControl on the correct Control.

If you have a DataList as you said you first need to find the correct record. Example

C#
foreach(var item in MyDataList.Items) {
   var myLabel = item.FindControl("ProductPromotionLabel");
   if(myLabel !=null) {
      myLabel.Visible = false;
   }
}


FindControl doesn't consider nesting. The easiest way is to set a breakpoint and look for at the Page with its Controls hierarchy.
GeneralRe: datalist itemtemplete control at server side Pin
MichaelCheong8915-Nov-13 1:54
MichaelCheong8915-Nov-13 1:54 
Questionimage button border click Pin
MichaelCheong8914-Nov-13 22:40
MichaelCheong8914-Nov-13 22:40 
AnswerRe: image button border click Pin
Marco Bertschi14-Nov-13 22:54
protectorMarco Bertschi14-Nov-13 22:54 
GeneralRe: image button border click Pin
MichaelCheong8914-Nov-13 23:24
MichaelCheong8914-Nov-13 23:24 
GeneralRe: image button border click Pin
Marco Bertschi14-Nov-13 23:25
protectorMarco Bertschi14-Nov-13 23:25 
Questionseparate compound color planes Pin
nhocclever14-Nov-13 20:16
nhocclever14-Nov-13 20:16 
AnswerRe: separate compound color planes Pin
Pete O'Hanlon14-Nov-13 20:36
subeditorPete O'Hanlon14-Nov-13 20:36 
GeneralRe: separate compound color planes Pin
harold aptroot14-Nov-13 22:14
harold aptroot14-Nov-13 22:14 
GeneralRe: separate compound color planes Pin
nhocclever17-Nov-13 17:06
nhocclever17-Nov-13 17:06 
GeneralRe: separate compound color planes Pin
harold aptroot17-Nov-13 22:06
harold aptroot17-Nov-13 22:06 
GeneralRe: separate compound color planes Pin
nhocclever19-Nov-13 0:53
nhocclever19-Nov-13 0:53 
QuestionC# modify ssrs report property Pin
dcof14-Nov-13 11:41
dcof14-Nov-13 11:41 
QuestionConvert HTML to PDF Pin
NYCABR14-Nov-13 9:50
NYCABR14-Nov-13 9:50 
QuestionThreading - Play / pause / stop question Pin
Mirko Jurcevic14-Nov-13 3:07
Mirko Jurcevic14-Nov-13 3:07 
AnswerRe: Threading - Play / pause / stop question Pin
Pete O'Hanlon14-Nov-13 3:28
subeditorPete O'Hanlon14-Nov-13 3:28 
GeneralRe: Threading - Play / pause / stop question Pin
Mirko Jurcevic14-Nov-13 3:33
Mirko Jurcevic14-Nov-13 3:33 
GeneralRe: Threading - Play / pause / stop question Pin
Pete O'Hanlon14-Nov-13 4:02
subeditorPete O'Hanlon14-Nov-13 4:02 

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.