Simple Question
-
I want to type cast the text in text box to integer? Another guestion is that how to set text box tht the user can only type numbers into it? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975 -
I want to type cast the text in text box to integer? Another guestion is that how to set text box tht the user can only type numbers into it? Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
Wish You Were Here-Pink Floyd-1975Mazdak wrote: I want to type cast the text in text box to integer?
Int32.Parse(myString);
if it throws an exception the string wasn't an integer :) Mazdak wrote: Another guestion is that how to set text box tht the user can only type numbers into it? Quick solution is to look for and use the masked edit C# control here on CP; secondary solution is to take the code it uses (the Key* events) and handle those the same way. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978 -
Mazdak wrote: I want to type cast the text in text box to integer?
Int32.Parse(myString);
if it throws an exception the string wasn't an integer :) Mazdak wrote: Another guestion is that how to set text box tht the user can only type numbers into it? Quick solution is to look for and use the masked edit C# control here on CP; secondary solution is to take the code it uses (the Key* events) and handle those the same way. James Sonork ID: 100.11138 - Hasaki "Smile your little smile, take some tea with me awhile. And every day we'll turn another page. Behind our glass we'll sit and look at our ever-open book, One brown mouse sitting in a cage." "One Brown Mouse" from Heavy Horses, Jethro Tull 1978