Skip to content

Instantly share code, notes, and snippets.

@zeroef
Created December 7, 2016 17:32
Show Gist options
  • Select an option

  • Save zeroef/d3f5f08c9513c92208f10b33507a88ec to your computer and use it in GitHub Desktop.

Select an option

Save zeroef/d3f5f08c9513c92208f10b33507a88ec to your computer and use it in GitHub Desktop.
public enum QuestionType
{
Radio = 1,
DropDown = 2,
Textbox = 3,
Checkbox = 4
}
public class AnswerOptions
{
public int AnswerOptionId {get;set;}
public string Text {get;set;}
public string Value {get;set}
public int DisplayOrder {get;set;}
}
public class Question
{
public int QuestionId {get;set;}
public int PartId {get;set;}
public int SectionId {get;set;}
public QuestionType QuestionType {get;set;}
public string Text {get;set;}
public List<AnswerOptions> AnswerOptions {get;set;}
public string HelpText {get;set;}
}
<html>
<h1>Part 1</h1>
<div>
Section 1
foreach (q in questions.Where(w => w.SectionId == 1 && w.PartId == 3).OrderBy(o => o.{
<asp:Question q>
}
</div>
forms[]
question_answer_id_{0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment