public void ShowProperty() { try { if (Session["propertyvalue"] != null) { string PropertyVale = Session["propertyvalue"].ToString(); ListView1.DataSource = uc.LoadPropert(PropertyVale); ListView1.DataBind(); } else { Session["propertyvalue"] = "0"; } } catch (Exception ex) { string text = ex.Message.ToString(); ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false); } }