Thanks Martin!
>Hi, Kevin.
>
>>I'm trying to cast a textbox value to int;
>>Can someone help me out please?
>>
>>
>>// Define the port number variable
>>int iPortNo = 0;
>>
>>// Read in the port number from the textbox
>>iPortNo = (int)txtPort.Text;
>>
>
>You can use Einar's one or a conversion:
>
>>
>>// Define the port number variable
>>int iPortNo = 0;
>>
>>// Read in the port number from the textbox
>>iPortNo = Convert.ToInt32( txtPort.Text );
>>
>
>Regards,
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people