You should use it in every where there maybe an error occurs.for example: 
user input two number A and B, if you use A/B then you should add a try catch for the B=0 situation.another example:int custid=0;
if (Request.QueryString["CustID"] != null)
{
  try
  {
    custid = int.Parse(  Request.QueryString["CustID"].ToString() );
  }
  catch
  {
  }
}Because you cann't make sure the passed in custid always be a number.etc.

解决方案 »

  1.   

    to zxhong(红透半边天)
           能不能写下具体捕捉什么错误?让大家看看嘛。to spring_ok(SpringDotNet)
           能不能再举一些其他常用的错误?
      

  2.   

    spring_ok(SpringDotNet) 说的很清楚,一切肯能出错的地方都可以用Try...catch 捕捉
      

  3.   

    各位能不能具体的讨论以下。
    象“一切肯能出错的地方都可以用Try...catch 捕捉”这种话说了和没说一样。
      

  4.   

    通常在执行sqlCommand时也调用try...catch,如:sqlConnection.Open();
    try
    {
         sqlCommand.ExecuteNonQuery();
    }
    catch 
    {
         Message.Text = " ... ";
         Message.Style["color"] = "red";     
    }
      

  5.   

    不可预料的调用方法内部错误,包括类型转换,数据库操作等
    如果可以预料的错误,尽量避免错误捕捉,如 if(obj!=null)to buaawjh(神之恋语) :需要系统释放资源,一般用finally
      

  6.   

    用  try  好处大家都知道,用TRY有什么不好?为什么要避免用TRY??
      

  7.   

    使用try catch 的话会有很大的性能问题 所以
    如果可以预料的错误,尽量避免错误捕捉,如 if(obj!=null)