protected void Page_Load(object sender, EventArgs e) { if (Request["fileid"] != "" || Request["fileid"] != null) { string id = Context.Request["fileid"]; model = bll.GetModelById(id); if (model.FileName == null) { Response.Redirect("error.html"); } //上下篇 List <T_File> lastFileList = bll.GetLastFile(id); List <T_File> nextFileList = bll.GetNextFile(id); if (lastFileList.Count > 0) { lastFileHref = "FileDetail.aspx?FileId=" + lastFileList[0].FileId; lastFileTitle = lastFileList[0].FileSummary; } else { lastFileHref = ""; lastFileTitle = "没有了"; } if (nextFileList.Count > 0) { nextFileHref = "FileDetail.aspx?FileId=" + nextFileList[0].FileId; nextFileTitle = nextFileList[0].FileSummary; } else { nextFileHref = ""; nextFileTitle = "没有了"; } } else { Response.Redirect("error.html"); } }