private void LoadLanes() { try { string str = hidSelectedSpace.Value.Replace(",", ""); DataSet ds = Lots.getPermanentLotSpaceLane(Convert.ToInt32(str)); gvlane.DataSource = ds; gvlane.DataBind(); if (ds == null && ds.Tables.Count <= 0) { lnkLanePerLot.Visible = false; } else { if (ds.Tables[0].Rows.Count == 0) lnkLanePerLot.Visible = false; else lnkLanePerLot.Visible = true; } dvPermanentLot.Visible = true; dvSpace.Visible = false; dvlane.Visible = true; } catch (Exception e) { } }