Here is the try catch version of it with Pokemon Exception handing
try
{
int FID = convert.Toint32(linkbutton.CommandArgument);
}
catch(Exception ex)
{
}
also If you prefer not to handle an exception if the conversion fails, you can call the
Int32.TryParse
method instead. It returns a Boolean value that indicates whether the conversion succeeded or failed.