Kalyani Shevale

Kalyani Shevale

  • NA
  • 3.2k
  • 711.6k

Rating star generated in dynamic on perticular topic.

Sep 3 2018 11:46 PM
In MVC 
I want Display dynamic rating star on one question and under multiple types and particular type on different rating star in MVC.
 the code will be HTML or JS or Jquery.
 
I have to try this code
  1. for (int i = 0; i < values.Length; i++)  
  2.                                                         {  
  3.                                                             <fieldset class="rating" id="@i">  
  4.                                                                 @values[i].Trim()  
  5.                                                             <input type="radio" id="@i" name="@values[i].Trim()" value="5+@i" /><label class="full" for="star5" title="Awesome - 5 stars"></label>  
  6.                                                             
  7.                                                             <input type="radio" id="star4" name="@values[i].Trim()" value="4+@i" /><label class="full" for="star4" title="Pretty good - 4 stars"></label>  
  8.                                                             <input type="radio" id="star3" name="@values[i].Trim()" value="3+@i" /><label class="full" for="star3" title="Meh - 3 stars"></label>  
  9.                                                             <input type="radio" id="star2" name="@values[i].Trim()" value="2+@i" /><label class="full" for="star2" title="Kinda bad - 2 stars"></label>  
  10.                                                             <input type="radio" id="star1" name="@values[i].Trim()" value="1+@i" /><label class="full" for="star1" title="Sucks big time - 1 star"></label>  
  11.                                                         </fieldset>  
  12.   
  13.                                                          
  14.                                                                 }  
 
 please help me.

Answers (1)