Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Removing mask out of maskedtextbox

Posted on 2014-11-16
3
Medium Priority
?
136 Views
Last Modified: 2014-11-16
I need to remove the "/" out of the maskedtextbox.  I have found one solution and it returns a "False" value.

Dim casenumbernomask As String = txtCaseNumber.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals

Open in new window


The setup is like this: 14/11/2001

When it saves to the db, I need it to save like this: 14112001

Thanks in advance!
0
Comment
Question by:russell12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 2000 total points
ID: 40446178
Try this (untested):
Dim casenumbernomask As String = txtCaseNumber.Replace("/", "")

Open in new window

This assumes txtCaseNumber is your date with /.

HTH,
Dan
0
 
LVL 2

Author Comment

by:russell12
ID: 40446432
I have tried that and the error I get is:
'Replace' is not a member of 'System.Windows.Forms.MaskedTextBox'.
Thanks for responding!
Russell
0
 
LVL 2

Author Closing Comment

by:russell12
ID: 40446436
I have found the solution.  The issue is I do not dim casenumbernomask, instead I put :

txtCaseNumber.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals

Open in new window


I am giving you the points for responding and trying to help!!  Thanks again for your help!!!!

Russell
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video teaches viewers about errors in exception handling.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question