protected void Page_Load(object sender, EventArgs e) { if (Session["UserId"] == null) { Response.Redirect("../Login.aspx"); } if (!IsPostBack) { ResetControls(); ViewState["sortColumn"] = "JVoucherDate"; ViewState["sortDirection"] = gf.ConvertSortDirectionToSql(SortDirection.Descending); PopulateHeaderGrid(ViewState["sortColumn"].ToString(), ViewState["sortDirection"].ToString()); ViewState["sortColumntransaction"] = "Ledger Name"; ViewState["sortDirectiontransaction"] = gf.ConvertSortDirectionToSql(SortDirection.Descending); } }