Accessing the value of RadMaskedTextBox using javascript or JQuery

2 posts, 0 answers
  1. VIJAY
    VIJAY avatar
    31 posts
    Member since:
    May 2011

    Posted 25 Jul 2012 Link to this post

    We have RadMaskedTextBox control and we are setting the PromptChar and Mask propery of RadMaskedTextBox  as PromptChar="_" and Mask="###-###-####". 
    We are accessing the value of RadMaskedTextBox through the javascript like the following:

    $("#<%= rmtbPhone.ClientID %>_text").val()

    When there is no value in RadMaskedTextBox
    For DLL version: 2011.2.816.40, it is giving value as Empty("")
    For DLL version: 2012.2.724.40, it is giving value as "___-___-____" instead of Empty("") 

    How to get the actual value when using new DLL through Javascript or JQuery?

    Thanks in advance,
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 27 Jul 2012 Link to this post


    <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" SelectionOnFocus="SelectAll"
               Label="IP address: " PromptChar="_" Width="300px" Mask="<0..255>.<0..255>.<0..255>.<0..255>">
    function ClientClicktc() {
                   var RadMaskedTextBox1 = $find("<%= RadMaskedTextBox1.ClientID %>");
                   RadMaskedTextBox1.get_textBoxValue(); //
                   RadMaskedTextBox1.get_value(); // 123123123213

    Jayesh Goyani
  3. DevCraft R3 2016 release webinar banner
Back to Top