How to create simple range slider in ASP.NET MVC 3 without using external libraries such as telerik
or any other?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- MVC-Routing,Why i can not ignore defaults,The matc
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
If you are fine with jQuery UI:
jQuery UI Slider
Sample Code:
You can take a look at the ASP.NET MVC Slider component by Shield UI, which is another way to easily create a powerful slider in your MVC views.
Razor code looks like this:
MVC uses javascript to perform dynamic operations at the client side. Creating a slider using images and javascript will take much time and extensive research which some opensource libs have already done.
Jquery and Jqueryui is one such lib which is open source and *Microsoft also includes these libs whenever you create a MVC project in scripts folder. Check the scripts folder in your MVC project and you can see something like jquery-ui-1.8.11.js (version may vary)
Slider sample with jqueryui:
http://jqueryui.com/demos/slider/