Radmaskedtextbox not accepting promptchar

2 posts, 0 answers
  1. Raja Rajeswari Mohan Venkataraman
    Raja Rajeswari Mohan Venkataraman avatar
    14 posts
    Member since:
    Nov 2009

    Posted 08 Dec 2011 Link to this post

    Hi,

    I have the following Radmaskedtextbox.

    <

     

    telerik:RadMaskedTextBox Runat="server" ID="MaskEditLon" SelectionOnFocus="CaretToBeginning"

     

     

    Width="91px" PromptChar="0" >

     

    </

     

    telerik:RadMaskedTextBox>

     


    In  the page_load i have set the mask for the Radmaskedtextbox.

    Protected

     

    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

     

    MaskEditLon.Mask =

    "<W|E> ### ##' ##"""""

     

     

    End Sub

     


    Now if i enter 0 in the control it does not accepts zero. I want zero to be used both as promptchar and also as the input in the radmaskedtextbox.

    Could you please help me to achieve what I want.

    Thanks,
    Raji




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

    Posted 09 Dec 2011 Link to this post

    Hello,

    You can set the promptchar as shown below.

    CS:
    Protected Sub Page_Load(sender As Object, e As EventArgs)
        MaskEditLon.Mask = "### ##' ##"
        MaskEditLon.PromptChar = "0"
    End Sub

    Also take a look into the following demo.
    Input / First Look

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