• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 149
  • Last Modified:

how to find a data that is pure string or not in vb.net ?

how to check IsPureString() function in vb.net ?

if  (keycode>=65 and keycode<=92 )or (keycode >=97 and keycode<=122)  then

this is to validate ispurestring or not.    except this idea, what are the ways and libarary functions  available in vb.net  ?
0
softwareachiever
Asked:
softwareachiever
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
there is not much other ways.

one thing you need to be cautious, from your code you seem to use the keypress (or keydown) event. a user would be able to paste a numeric value if you only handle this event
0
 
David Johnson, CD, MVPOwnerCommented:
purestring() or ispurestring() is not a .net function

what are the ways and library functions  available in vb.net  ?

There are thousands of built-in functions available in .net, depending upon which version of .net you are referring to..

if (keycode>=65 and keycode<=90)or (keycode >=97 and keycode<=122)

Don't know where you got 92 but 90 is 'Z'
0
 
informaniacCommented:
Is this an ASP.Net application you are using or a Windows application?
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
darjimaulikCommented:
There is a function isLetter
You can loop through your string and verify that each character is letter or not.
Details of the function:
 http://msdn.microsoft.com/en-us/library/yyxz6h5w(v=vs.90).aspx
0
 
softwareachieverAuthor Commented:
my application is vb.net windows application
0
 
darjimaulikCommented:
You can find vb.net code in the link I have provided.
0
 
Éric MoreauSenior .Net ConsultantCommented:
in the link provided by darjimaulik, click the VB tab.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now