2015-11-26 38 views
1

從UNIQUEID CheckBoxList的所有選擇值我已創建這樣的CheckBoxList列表:從DDL.ID獲取VB.NET

DDL.ID = "DDL_" & SelectedCategory & "_" & SubAssy & "_" & ProductType 
         RBL.ID = "RBL_" & SelectedCategory & "_" & SubAssy & "_" & ProductType 
         CBL.ID = "CBL_" & SelectedCategory & "_" & SubAssy & "_" & ProductType 

ID產生這樣的:CBL_Seatbel_General_General

如何讓所有選擇值通過這個獨特的ID?

回答

0

我找到一個solutin另一個人:

  Dim GeneralCBL As CheckBoxList = gvr.FindControl("CBL_Seatbelt_General_General") 
      Dim Count0 As Integer = GeneralCBL.Items.Count 

      For i = 0 To Count0 - 1 
       If GeneralCBL.Items(i).Selected = True Then 

       Else 

       End If 
      Next