Sachin Rajak

Sachin Rajak

  • NA
  • 10
  • 713

How to change Paging (Pagination) color dynamically on MVC 5

Oct 13 2018 12:08 PM
MVC#I have created a quiz application using Paging (Pagination). In each page one question is shown. I want to make it so that when the user selects an option and clicks the save next button, the current paging number color will change to green, and if the user does not select any option, then the paging number color is white.
@for (int i = 0; i < Model.Option.Count; i++)
{
  • @Html.Raw(Model.Option[i].Label.Replace("[", "<").Replace("]", ">"))
    }
    page bar code:
    @for (int i = 0; i < Model.TotalQuestionInSet; i++)
    {
    @(i + 1)
    }

    Answers (1)