protected void Page_Load(object sender, EventArgs e) { if (Session["id"] == null) { Response.Redirect("AdminPanel.aspx"); } For_Admin Shop = new For_Admin(); //Get_Malls Gm = new Get_Malls(); GvShops.DataSource = Shop.Shops(); GvShops.DataBind(); DataTable dt = Shop.bindDropdown(); ddlmalls.DataSource = dt; if (!IsPostBack) { ddlmalls.SelectedIndex = -1; ddlmalls.DataTextField = "Name"; ddlmalls.DataValueField = "Id"; ddlmalls.DataBind(); ddlmalls.Items.Insert(0, "-Please Select-"); } }
protected void GvShops_PageIndexChanging(object sender, GridViewPageEventArgs e) { GvShops.PageIndex = e.NewPageIndex; GvShops.DataBind(); }