判断是否为空和整数,是则返回1,否则返回pageIndex 。 string pageIndex = Request.QueryString["page"]; pageIndex = (string.IsNullOrEmpty(pageIndex) || !Discuz.Common.Utils.IsInt(pageIndex)) ? "1" : pageIndex;