protected void BindData(string PubIDs) { this.mySearch = ((Search)Session[PubEntAdminManager.strSearchCriteria]); //this.mySearch.ClearPubId(); List <Pub> l_listPub = PE_DAL.AdminDoSearchByPubID(PubIDs, this.SortExpression == String.Empty ? PubEntAdminManager.strDefaultSearchSorting : this.SortExpression, System.Convert.ToInt32(this.SortAscending)); //this.lblTotalResCnt.Text = l_listPub.Count.ToString(); //this.gvResult.DataSource = l_listPub; //this.gvResult.DataBind(); if (l_listPub.Count == 1) { if (this.Export) { this.RemColumnHeadersSortedImg(); this.gvResult.DataSource = l_listPub; this.gvResult.DataBind(); } else { this.mySearch.ClearPubId(); this.mySearch.AddPubId(l_listPub[0].PubID); Session[PubEntAdminManager.strSearchCriteria] = this.mySearch; //go directly to pubrecord page if (PubEntAdminManager.TamperProof) { PubEntAdminManager.RedirectEncodedURLWithQS("PubRecord.aspx", "mode=view&pubid=" + l_listPub[0].PubID.ToString()); } else { Response.Redirect("PubRecord.aspx?mode=view&pubid=" + l_listPub[0].PubID.ToString(), true); } } } else { this.lblTotalResCnt.Text = l_listPub.Count.ToString(); if (!this.Export) { this.mySearch.ClearPubId(); //Update the column headers UpdateColumnHeaders(); } else { this.RemColumnHeadersSortedImg(); } this.gvResult.DataSource = l_listPub; this.gvResult.DataBind(); if (l_listPub.Count == 0) { this.trTopCtrlPnl.Visible = this.trBtmCtrlPnl.Visible = false; this.gvResult.Visible = false; this.hyplnkRefSrch2.Visible = this.hyplnkSrch2.Visible = false; } } Session[PubEntAdminManager.strSearchCriteria] = this.mySearch; }