一个关于 asp.net 的简单问题

一个页面接受另一个页面的传递过来的参数,

protected int id
{
  get
  {
    return string.IsNullOrEmpty(Request.QueryString["id"]) ? 0 : Convert.ToInt32(Request.QueryString["id"]);
  }
}

 

protected int AdID
{
  get
  {
    int adID;
    int.TryParse(Request.QueryString["AdID"], out adID);
    return adID;
  }
}

 

请问,有什么区别么

posted @ 2012-11-23 21:24  iisp  阅读(126)  评论(0编辑  收藏  举报