string strid = txtId.Text; int id = Convert.ToInt32(strid);
string strid = txtId.Text; int id=0; Int32.TryParse(strid, out id);
string strid = txtId.Text; if(strid != "") { int id = Convert.ToInt32(strid); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)