Ajax Control Toolkit Slider 服务器端控件

Slider控件就是以滑块的形式显示数据(当前数字值)。用户还可以通过文本框控制滑块的数据值。

属性列表:
TragetControlID:应用Slider的控件ID
Minimum:滑块的最小值
Maximum:滑块的最大值
BoundControlID:绑定到滑块上,用来显示数据的控件的ID
Steps:每次滑块时的步数
Decimals:显示值的小数位数
RaiseChangeOnlyOnMouseUp:鼠标离开滑块时的事件


实例解析一、简单实现用TextBox来控制滑块

   

 1   < form id = " form1 "  runat = " server " >
 2      < div >
 3          < asp:ScriptManager ID = " ScriptManager1 "  runat = " server " >
 4          </ asp:ScriptManager >
 5     
 6      </ div >
 7          < asp:TextBox ID = " TextBox1 "  runat = " server " ></ asp:TextBox >
 8          < asp:TextBox ID = " TextBox2 "  runat = " server " ></ asp:TextBox >
 9          < cc1:sliderextender id = " SliderExtender1 "  runat = " server "  boundcontrolid = " TextBox2 "
10             decimals = " 3 "  enablehandleanimation = " True "  maximum = " 150 "  minimum = " 10 "  targetcontrolid = " TextBox1 " ></ cc1:sliderextender >       
11      </ form >

你可能感兴趣的:(slider)