2012-06-28 75 views
0

我創建一個面板內的鏈接按鈕,並將事件處理程序連接到Click事件。它不是射擊。這是我的代碼。這是回發丟失?LinkBut​​ton點擊事件不會觸發後編程連接

  foreach (var item in clients) 
      { 
       var codeLb = new LinkButton() { Text = item.CLIENT_CODE, CssClass = "codeColumn", CommandArgument = item.CLIENT_CODE, CommandName = "Select" }; 
       codeLb.Click += ResultsLinkButton_Click; 
       ResultsPanel.Controls.Add(codeLb); 

       var nameLb = new LinkButton() { Text = item.CLIENT_NAME, CssClass = "nameColumn", CommandArgument = item.CLIENT_CODE, CommandName = "Select" }; 
       nameLb.Click += ResultsLinkButton_Click; 
       ResultsPanel.Controls.Add(nameLb); 
      } 

回答

相關問題