Ajax Control Toolkit-slider: one day

Source: Internet
Author: User
Most people in Shandong know the absurd story of Han Fu Yi in Jinan that year. One of his poems is: "Qianfoshan, Foshan qianqian, and the other is rough at the top. One day, the top is thick and the bottom is sharp."
In the past few days, we have used the silder control of Ajax Control Toolkit during the project process. The style is vertical. However, after the test is submitted
Now I have feedback: Why is the maximum value 10 below and the minimum value 0 above? Yes. Is this caused by cultural differences? Don't worry about it. How can we "reverse" it?
 
First, I consider the following constraints:
1. insufficient time to completely modify the slider Control
2. Only this control is used in the project. Other controls or pages are not displayed, Which is controllable.

So I decided to use the simplest implementation method:
[Step 1] The maximum value 0 for slider and the minimum value is-10;
What is the current effect? The above is-10 and below is 0; is it enough to remove the negative number? Continue-
[Step 2] Open the source code sliderbehavior. js file of the Ajax Control Toolkit and add the _ ensurebinding method as follows:
If (value <0)
{
Value =-value;
}
What is the current effect? The page is changed to 10 9 8... 2 1-0 0
[Step 3] what is-0? Yes, it is true that the positive, zero, and zero in mathematics appear on the page! Hand your teeth!
If (value <0)
{
Value =-value;
}
If (value <= 0)
{
Value = 0;
}
Solve the problem!


There is no problem with the special circumstances of our project, so we have to worry about browser compatibility:
1. The latest version of Slider will solve this problem when the style is lost after callback. Please download the latest version from the official website.
2. During the development process, if you use multiple versions of ajaxcontroltoolkit DLL, you may find that the handler slider on the above is missing when debugging the page.
3. If time permits, I will never do this because there are other solutions, such as jquery.
4. I don't know why developers put the maximum value below when they first designed this control. I need a reasonable explanation.
5. I hope that the silder will roll over one day, and the top will be rough at the bottom.

Project reasons: I haven't written a blog for a long time. Are you okay?
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.