winforms - c# text box "between" validation -


i trying have text box validate if entry number between 1 , 100.

example:

if (textbox.text equal numbers between 1 , 100) {     this;  }  else  {      this;  } 

this form validation trackbar used jpeg compression , can have numeric values between 1 , 100. how do this?

enter image description here

string text = textbox.text; try{     long value = long.parse(text.trim());     if(value > 0 && value < 101){        //do here     }     else{        //do else     } } catch(exception e){    messagebox.show("please check input , try again"); } 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -