private void BindData() { //Grid var i = 0; _colLocations = _objCtlLocation.EventsLocationList(PortalId); GrdLocations.DataSource = _colLocations; GrdLocations.DataBind(); if (GrdLocations.Items.Count > 0) { GrdLocations.Visible = true; for (i = 0; i <= GrdLocations.Items.Count - 1; i++) { ((ImageButton)GrdLocations.Items[i].FindControl("DeleteButton")).Attributes.Add( "onclick", "javascript:return confirm('" + Localization.GetString( "AreYouSureYouWishToDelete.Text", LocalResourceFile) + "');"); } } }
protected void btnLocationsFromCache_Click(object sender, EventArgs e) { GrdLocations.DataSource = (DataSet)Cache["LocationsCache"]; GrdLocations.DataBind(); }
protected void BtnFromSession_Click(object sender, EventArgs e) { GrdLocations.DataSource = (DataSet)Session["LocationSess"]; GrdLocations.DataBind(); }