2012-05-25 2 views
1

나는 쉬울 것이라고 생각했지만, 어떻게 할 수는없는 것 같습니다. 나는 체크 박스 (http://msdn.microsoft.com/en-us/library/system.windows.forms.checkbox.appearance.aspx).체크 박스 목록의 모양을 수정하는 방법 버튼 모양이

함께 할 단, checkboxlist 제어와 함께 할 수있는 방법?

+1

jQuery를 사용할 수 있습니까? 사실이라면 더 세련된 UI로 DOM을 감쌀 수 있습니다. –

+0

답해 주셔서 감사합니다. ToggleButton (http://www.asp.net/ajaxlibrary/HOW%20TO%20Use%20the%20ToggleButton%20Control.ashx)으로 스타일을 변경할 수 있다는 것을 알았습니다. 작동한다고 생각합니다. 그러나 나는 더 간단한 방법을 요구하고있다. 어떤 것을 할 수있는 속성이 있거나 비슷한 것이 있으면. – chelder

답변

1

스티브 B가 제안한 것처럼, 좋은 방법이 jQuery를 사용하는 방법을 발견했다. 나는 내부의 체크 박스를 넣어 ASP :. 리피터 제어, 나는 버튼 모양이 체크 박스의 모양을 수정 이것은 코드입니다 :

<asp:Repeater ID="RepeaterVocabularyWords" runat="server" OnItemCommand="RepeaterVocabularyWords_ItemCommand"> 
    <ItemTemplate> 
     <span class="storeCheck"> 
      <asp:CheckBox ID="CheckBoxVocabularyWord" Font-Size="0px" runat="server" Text="<%# Container.DataItem %>" 
       ClientIDMode="Static" CssClass="{labelOn: '<%# Container.DataItem %>', labelOff: '<%# Container.DataItem %>', easing: 'easeOutBounce', duration: 500}" /> 
     </span> 
    </ItemTemplate> 
</asp:Repeater> 

그리고 뒤에있는 코드 :

String [] wordsForButtons = new[] { "text1", "text2", "text3" };    
RepeaterVocabularyWords.DataSource = wordsForButtons; 
RepeaterVocabularyWords.DataBind(); 

누군가에게 유용하기를 바랍니다.

카를로스

관련 문제