locked
asp.net ajax control toolkit slideextender step 1 not functioning RRS feed

  • Question

  • User-1062164168 posted

    while using ajax control toolkit slideextender,

    found that it is not functioning,

    while using 10 it is functioning

    <asp:SliderExtender ID="SliderExtender1" runat="server"
        TargetControlID="txt01"
        Minimum="-100"
        Maximum="100"
        BoundControlID="txt02"
        Steps="1" />
    
             <asp:TextBox ID="txt01" runat="server"></asp:TextBox>
            <br />
            <asp:TextBox ID="txt02" runat="server" ontextchanged="TextBox2_TextChanged" AutoPostBack="true" ></asp:TextBox>
    
    
        protected void TextBox2_TextChanged(object sender, EventArgs e)
        {
            ClientScriptManager cs = this.ClientScript;
            cs.RegisterStartupScript(this.GetType(), "changesize", "document.getElementById('TextBox2').size = document.getElementById('TextBox2').value;", true);
        }

    Monday, June 9, 2014 12:28 AM

Answers

  • User1918509225 posted

    Hi csharp_starer,

    For your post ,I write a sample for you:

    <html>
    <head runat="server">
        <title></title>
        <script src="Scripts/jquery-1.7.1.js"></script>
        <script type="text/javascript">
            function onValueChanged(text) {
                //alert('Value changed:' + text.value);
                $("#TextBox1").attr('size', text.value);
            }
    
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
      <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
            </ajaxToolkit:ToolkitScriptManager>
        <asp:TextBox ID="Slider1" runat="server" onchange="onValueChanged(this)"></asp:TextBox>
        <ajaxToolkit:SliderExtender ID="SliderExtender1" runat="server"
        TargetControlID="Slider1" Minimum="1" Maximum="100" BoundControlID="TextBox1"/>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>   
        </form>
    </body>
    </html>
    

    Best Regards,

    Kevin Shen.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 10, 2014 1:15 AM