Пример #1
0
    protected void ImgVslImgDelete_click(object sender, EventArgs e)
    {
        if (HiddenFlag.Value == "Edit")
        {
            if (lnkVslImage.Text != "")
            {
                if (File.Exists(Server.MapPath("~/Uploads/VesselImage/" + lnkVslImage.Text)))
                {
                    File.Delete(Server.MapPath("~/Uploads/VesselImage/" + lnkVslImage.Text));
                }
            }
            int Retval = objBLL.Delete_VesselImageAttachment(Convert.ToInt32(txtVesselID.Text), Convert.ToInt32(Session["UserID"].ToString()));
        }

        lnkVslImage.Text        = "";
        ImgVslImgDelete.Visible = false;
        BindVesselGrid();
        string AddNewVessel = String.Format("showModal('dvAddNewVessel',false);");

        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "AddNewVessel", AddNewVessel, true);
    }