コード例 #1
0
 private String getBox() {
     Html html = new Html();
     if (poll.Type == 1) {
         html.CheckBox( "pollOption", Convert.ToString( (optionIndex + 1) ), "" );
     }
     else {
         html.Radio( "pollOption", Convert.ToString( (optionIndex + 1) ), "" );
     }
     return html.ToString();
 }
コード例 #2
0
 private String getControl( ContentPoll poll, int optionIndex, String optionText ) {
     Html html = new Html();
     if (poll.Type == 1) {
         html.CheckBox( "pollOption", Convert.ToString( (optionIndex + 1) ), optionText );
     }
     else {
         html.Radio( "pollOption", Convert.ToString( (optionIndex + 1) ), optionText );
     }
     return html.ToString();
 }
コード例 #3
0
ファイル: PollController.cs プロジェクト: Boshin/wojilu
        private String getControl( ForumPoll poll, int optionIndex, String optionText )
        {
            Html html = new Html();
            if (poll.Type == 1) {
                html.CheckBox( "pollOption", Convert.ToString( (optionIndex + 1) ), optionText );
            }
            else {
                String __name = "pollOption";
                String __val = Convert.ToString( (optionIndex + 1) );
                String __txt = optionText;

                html.Code( string.Format( "<label class=\"radio\"><input type=\"radio\" name=\"{0}\" id=\"{3}\" value=\"{1}\" /> {2}</label> ", __name, __val, __txt, __name + __val ) );
            }
            return html.ToString();
        }