private void LoadSpaces() { try { string str = hidSelectedLot.Value.Replace(",", ""); DataSet ds = Lots.getPermanentLotSpace(Convert.ToInt32(str)); grdSpaces.DataSource = ds; grdSpaces.DataBind(); if (ds == null && ds.Tables.Count <= 0) { lnkSpacePerLot.Visible = false; } else { if (ds.Tables[0].Rows.Count == 0) lnkSpacePerLot.Visible = false; else lnkSpacePerLot.Visible = true; } dvPermanentLot.Visible = true; dvPermanentLot.Visible = true; dvSpace.Visible = true; dvlane.Visible = false; } catch (Exception ex) { new SqlLog().InsertSqlLog(0, "lotInfo .LoadSpaces", ex); } }