The sliderextender control is used to extend the ASP: Textbox Control to realize the effect of changing the value on the scroll bar.
The following is an example:
1) Create an ASP. NET Ajax-enabeld web project in vs2005 and name it sliderextender1.
2) drag and drop two textbox in default. aspx. The default name is textbox1 and textbox2. Textbox1 is the target control of sliderextender, and textbox2 is the control that displays the modified value. Drag and Drop a sliderextender and set its attributes.
CodeAs follows:
1 < Div >
2 < BR />
3 < ASP: textbox ID = "Textbox1" Runat = "Server" > </ ASP: textbox > < BR />
4 < C0: sliderextender ID = "Sliderextender1" Runat = "Server" Boundcontrolid = "Textbox2"
5 Enablehandleanimation = "True" Raisechangeonlyonmouseup = "False" Targetcontrolid = "Textbox1" >
6 </ C0: sliderextender >
7 < ASP: textbox ID = "Textbox2" Runat = "Server" Width = "12px" > </ ASP: textbox >
8 & Nbsp;
9
10 </ Div >
Attribute description:
Targetcontrolid: The target control of the control, that is, the control to be extended.
Boundcontrolid: Displays the data control when the value is changed.
Enablehandleanimation: Whether the slider has an animated effect when the value is changed. If the value is true, the animation effect is displayed. If the value is false, the animation effect is unavailable.
Raisechangeonlyonmouseup: Set whether to trigger the event only when the mouse leaves. If the value is true, yes; otherwise, no.
3) press Ctrl + F5 to view the effect in the browser.
As follows: