'ASP.NET, C#: Create unresponsive rate slider (using open library or Microsoft's) to display average rating

I want to create unresponsive sliders for .net framework to display at the website. The slider should look like this or something similar: https://jqueryui.com/slider/#rangemin.

The maximum value for slider should be 10, and minimum would be 1.

The problem is, I want the slider to be:

  1. Unresponsive, since I only want to DISPLAY the average rating, not receive input from users.
  2. Dynamic: The number of slider depends on how many inputs that I received from customer. If I don't have any inputs, the slider shouldn't be seen. But if the inputs are in certain values (e.g. 17), then there should be 17 sliders displayed.
  3. The value displayed from the slider should be AVERAGE rating value. So, in some cases, there will be data displayed in 0 or 1 d.p.

I tried to search for solutions on the Internet, but the only solution that I received is by using JQuery. But still, the no. of sliders are not dynamic.

Note: I have a database from back-end system, and I already calculate the average rating value. I only want to make the slider display the rating in 1 d.p.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source