Advertisement

07.17.2008 at 06:27AM PDT, ID: 23573094
[x]
Attachment Details

C# textbox validation - How to find the ascii value of a textbox?

Asked by nirisan in C# Programming Language

Tags: C#

I want to validate a textbox with ascii values as i dont want spaces to be sent.
Currently im using this if statement but when a user puts a space it is accepted.

if ((MessageTextbox.Text != "")||(MessageTextbox.Text.Length > 0))
{

}


I want to only allow if the ascii value of the textbox is greater than 33.
Start Free Trial
 
 
[+][-]07.17.2008 at 06:36AM PDT, ID: 22025253

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 06:46AM PDT, ID: 22025361

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 06:57AM PDT, ID: 22025471

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 07:25AM PDT, ID: 22025782

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 08:49AM PDT, ID: 22026830

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 10:11AM PDT, ID: 22027600

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C# Programming Language
Tags: C#
Sign Up Now!
Solution Provided By: abel
Participating Experts: 2
Solution Grade: B
 
 
[+][-]07.22.2008 at 03:37AM PDT, ID: 22057753

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628