protected void OnPagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e) { (PrescListTable.FindControl("DataPager1") as DataPager).SetPageProperties(e.StartRowIndex, e.MaximumRows, false); if (hdnText.Value != "") { string yourValue = hdnText.Value.ToString(); if (yourValue == "Default") { PrescListView(); } else { this.PrescListView(); } } //else //{ this.PrescListView(); //} }
public void PrescListView() { cname = cusNameInput.Text; SearchPresc presc = new SearchPresc(cname, plisttable); try { ConnectionClass.SearchPrescList(presc); PrescListTable.DataSource = presc.PrescTable; PrescListTable.DataBind(); } catch { ClientScript.RegisterStartupScript(GetType(), "message", "<script>alert(' Error! ');</script>"); } finally { } }