Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Removing mask out of maskedtextbox

Posted on 2014-11-16
3
Medium Priority
?
146 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 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
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.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

886 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