protected void ImgDelete_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            if (txtModuleName.Text.Trim() == "")
            {
                string js = "alert('Please Enter Module name');";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "errorMail", js, true);
                return;
            }

            else
            {
                BLL_Infra_Lib_ModuleTemp.DELETE_Module(UDFLib.ConvertToInteger(hdnModuleTypeID.Value), txtModuleName.Text.Trim(), GetSessionUserID());
                string js = "alert('Module Deleted.');";
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "SUCCESS", js, true);

                rpt1.DataSource = BLL_Infra_Lib_ModuleTemp.Get_ModuleList();
                rpt1.DataBind();
            }
        }
        catch (Exception ex)
        {
            string js = "alert('Error Deleting module" + ex.Message.Replace("'", "") + "');window.close();";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "mailerror", js, true);
        }
    }