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(); }
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(); }