protected int GetExportCount()
        {
            string exportType = Request.QueryString["Type"];
            string ids        = Session["EXPORT_USER_IDS"] as string;

            if (!string.IsNullOrEmpty(exportType) && !string.IsNullOrEmpty(ids) && exportType == "selected")
            {
                return(AlwaysConvert.ToIntArray(ids).Length);
            }
            else if (!string.IsNullOrEmpty(Request.QueryString["filter"]))
            {
                var serializer = new JavaScriptSerializer();
                UserSearchCriteria criteria = serializer.Deserialize(Request.QueryString["filter"], typeof(UserSearchCriteria)) as UserSearchCriteria;
                return(UserDataSource.SearchCount(criteria));
            }
            else
            {
                return(UserDataSource.CountAll());
            }
        }