2013-08-23 3 views
0

여러 선택 라디오 버튼이있는 데이터 목록보기에 몇 가지 질문을 넣으 려하므로 각 질문 답변 또는 라디오 버튼 값을 목록에서 가져 오는 방법은 무엇입니까?데이터리스트의 라디오 버튼 값을 확인 했습니까?

+1

알려 주시기 바랍니다. 게시하기 전에 조사한 적이 있습니까? 그렇다면 질문의 차이점은 무엇입니까? – ckv

답변

0

enter image description here

protected void btnSave_Click(object sender, EventArgs e) 
     { 
      foreach (RepeaterItem item in Repeater1.Items) 
      { 
       // Checking the item is a data item 
       if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem) 
       { 
        var rdbList = item.FindControl("RadioButtonList1") as RadioButtonList; 
        // Get the selected value 
        string selected = rdbList.SelectedValue; 
       } 
      } 
     } 

이 시도하고 나 SO에서이 주제에 너무 많은 질문이 이미 있습니다