Solved

Removing mask out of maskedtextbox

Posted on 2014-11-16
3
109 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
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Dan Craciun earned 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now