Avatar of nirisan
nirisan

asked on 

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

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.
C#

Avatar of undefined
Last Comment
abel

8/22/2022 - Mon