How to set Slider control Value from ASP.NET AJAX Control Toolkit with JavaScript function?
Is this even possible?
How to set Slider control Value from ASP.NET AJAX Control Toolkit with JavaScript function?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sure is! You have to set the value of
asp:TextBoxcontrol that’s associated with yourSliderExtenderto the value that you want. So for this ASP markup:Which is basically:
asp:TextBoxnamed sliderBox (for theSliderExtenderto use)asp:SliderExtendersliderBox_SliderExtender (with basicallydefault values)
asp:Buttonnamed incButton. This has anonClientClickproperty that calls thechange()javascript functionAnd here is the
change()function:The
change()function increments the value in theasp:TextBoxcontrol by 10, thus increasing the sliders position each time you click the button.