@foreach(var sQ in Model.SubQuestions.Where(s => s.QuestionId == item.Id).ToList()) { counter++; var answer = Model.Answers.FirstOrDefault(a => a.SubQuestionId > 0 && a.SubQuestionId == sQ.Id); string ddlSelected = ""; string rate = "0"; if(answer != null) { var array = answer.Answer1.Split(','); ddlSelected = array[0]; rate = array[1]; } else { ddlSelected = "Select One"; } <tr style="color:#37589d"> <td> @Html.DisplayFor(x => sQ.Text) </td> <td> <div id="@sQ.Id" class="dropdown ddlparent"> <button style='font-size:10px;width:135px;border-color:#5F6E7D;background-color:#5F6E7D' class='btn btn-success dropdown-toggle' type='button' data-toggle='dropdown'> <span data-id="postRateScore-@counter" class="selection" style="font-size:12px" data-score="@rate">@ddlSelected</span> <span class='caret'></span> </button> <ul class='dropdown-menu dropdown-menu-right dropdown'> @foreach(var r in Model.PostRatings.Where(x => x.SubQuestionId == sQ.Id).ToList()) { <li><a href="#" id=@r.Id data-value=@r.RatingValue data-qid='@sQ.QuestionId' data-sqid='@sQ.Id'>@r.QuestionText</a></li> } </ul> </div> </td> <td> <span></span> </td> </tr> }
class="glyphicon glyphicon-check"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)