Solved

Removing mask out of maskedtextbox

Posted on 2014-11-16
3
131 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 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

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

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

627 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