MaskedTextbox set value

2 posts, 0 answers
  1. Vali
    Vali avatar
    2 posts
    Member since:
    Jun 2012

    Posted 27 Jun 2012 Link to this post

    Hi,
    Can anyone tell me how to change the value of a masked textbox using javascript.
    In the previous version I was using the SetValue(value) method but in the Q2 2012 version it doesn't work anymore.

    Is there a list of all the new methods anywhere?

    Thank you.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 27 Jun 2012 Link to this post

    Hi Vali,

    Try the following code snippet to set value to a RadMaskedTextBox.

    JS:
    <script type="text/javascript">
        function OnClientClick() {
            var tb = $find("<%= RadMaskedTextBox1.ClientID %>");
            var value = 34;
            tb.set_value(value);
        }
    </script>

    Please take a look into this documentation for more information about RadMaskedTextBox client-side object.

    Hope this helps.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top