Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 22nd, 2007, 08:48 AM
Authorized User
Join Date: Mar 2007
Location: Pune, Maharashtra, India.
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data Validation in textbox

I am very curious to know whether there is any function in C#.net
same as 'IsNumeric' and 'not IsNumeric' as we have in VB6.

Suppose in my application I have a textbox In which I am suppose to enter Name of person, and instead I enter a digit/number I should get the message that "Name should be alphabetical "


if I add two numbers entered in two textbox, and instead I enter a
alphabet/word should get a messageBox Flashed.

If there is any function please tell me.
Or Please Suggest a suitable method.....

  #2 (permalink)  
Old March 26th, 2007, 06:51 AM
Friend of Wrox
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2004
Location: New Delhi, India.
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubhav.kumar


Why don't you use regular expressions for this? I believe you will be having more flexibility over format of input and it is language neutral as well !!

This may help you : http://regexlib.com/Default.aspx

Anubhav Kumar

Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox validation rhd110 .NET Framework 2.0 1 March 28th, 2007 02:49 PM
textbox validation in c# dhol C# 3 July 22nd, 2005 05:57 AM
TextBox Validation Brettvan1 VB.NET 2002/2003 Basics 1 June 23rd, 2005 08:58 AM
Textbox Validation phudong3da Dreamweaver (all versions) 2 May 9th, 2005 02:47 PM
validation on textbox noor ASP.NET 1.0 and 1.1 Basics 2 May 4th, 2005 02:29 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.