1. Trim is a method: use rather txt_Studid.Text.Trim() as
txt_Studid.Text.Trim
2. Trim's return value is rather string as int: use
string str = txt_Studid.Text.Trim();
3. To convert string to integer use:
int a = Convert.ToInt32(str);
Good luck, dude!