判断是否为空和整数,是则返回1,否则返回pageIndex 。

string pageIndex = Request.QueryString["page"];
 pageIndex = (string.IsNullOrEmpty(pageIndex) || !Discuz.Common.Utils.IsInt(pageIndex)) ? "1" : pageIndex;
原文地址:https://www.cnblogs.com/whlhaikuotiankong/p/1969516.html