You must Sign In to post a response.
  • Category: Windows

    Masked Textbox vs Textbox in C#.net

    Hi,
    Difference between Masked Textbox vs Textbox in C#.net? Where we use Masked Textbox?
  • #647959
    hi ,
    when you have to use textbox as password field then you can use masked textbox.

    Regards
    Sagar pawar
    Software developer

  • #647973
    HI,

    Masked Text box:

    Masked textbox are used where we required input in specific format.

    Suppose we require a phone number as input . when we set this for mask text box then it will allow users to enter only Numbers not any other character.


    Regular Text Box:

    The regular text box allows the user to enter any type of string in the control.

    With Regards
    Kushal

  • #647979
    hi


    this.TextBox1.UseSystemPasswordChar = false;
    this.TextBox1.Mask = "00000-9999 ";
    this.Label1.Text = this.TextBox1.Mask;
    this.TextBox1.Focus();


    this will enter you only same format ..

    Regards
    Sagar pawar
    Software developer

  • #647997
    Masked Textbox is used if we want the value of textbox in a particular format.
    Like this:

    <toolkit:MaskedTextBox Mask="(000) 000-0000" Value="5551234567" />

    Regards,
    Sugandha
    Microsoft Certified Technology Specialist
    MY Blog..

  • #648017
    Hi

    Masked Textbox is an easy to use control that allows a developer to integrate a textbox that supports a defined mask.

    By default, this control acts as a normal text box, but by using the validation characters, you can specify the mask you wish the user to abide by.

    These characters include the letter C for character representation, and the number 9 for numerical representation.

    Other special characters are supported that will only allow that character to be entered.

    Regards
    Pallavi

  • #648035
    Hello,

    Masked TextBox is user control enhances the function of the TextBox control, which can mask the Date, IP Address, Phone numbers, SSN, digits, decimal and checks the validation, and automatically set the delimiter location.

    The regular text box allows the user to enter any type of string in the control.



    private void button1_Click(object sender, EventArgs e)
    {
    label1.Text = label1.Text + maskedTextBox1.Text;
    }



    Thanks
    Rajesh

    Regards
    Mr.Rajesh
    Software Engg.

  • #648827
    Hi!
    Masked Textbox

    >>It provides the best way to stop users from entering invalid data.

    >>The MaskedTextBox control constrains the format of user input by distinguishing between proper and improper user input. This class is an enhanced TextBox control that allows a preset pattern to be declared for accepting or rejecting user input.

    >>The Mask property of the MaskedTextBox control allows you to specify whether input characters are letters or numbers, as well as any formatting.

    Regards
    Kamlesh

    Regards
    Kamlesh Mohanty


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.