protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetExpires(DateTime.Now.AddMinutes(-1));
            divmsg.InnerHtml = "";
            lblerrmsg.Text = "";
            objmst = new MasterData();
            if (!Page.IsPostBack)
            {

                lbl_msg = (Label)this.Master.FindControl("lbl_headersite");
                lbl_msg.Text = "Create Presenter";
                (this.Master as Site1).SetfNewbutton("Presenter");
                if (!string.IsNullOrEmpty(Request.QueryString["presenterid"]))
                {
                    if (!string.IsNullOrEmpty(Request.QueryString["search"]))
                    {
                        string presenterid  = Request.QueryString["presenterid"];
                        lbl_msg.Text = "";
                        DataTable dtengdetails = objmst.GetEVPDetails(Convert.ToInt32(presenterid), 1);
                        DataTable dtvenuedetails = objmst.GetEVPDetails(Convert.ToInt32(presenterid), 2);
                        if (dtengdetails != null)
                        {
                            if (dtengdetails.Rows.Count > 0)
                            {
                                gvrEngagement.DataSource = dtengdetails;
                                gvrEngagement.DataBind();
                                lblEnggrid.Visible = true;
                            }
                        }
                        if (dtvenuedetails != null)
                        {
                            if (dtvenuedetails.Rows.Count > 0)
                            {

                                grdVenue.DataSource = dtvenuedetails;
                                grdVenue.DataBind();
                                lblVenuegrid.Visible = true;
                            }
                        }

                    }
                    else
                        lbl_msg.Text = "Modify Presenter";
                  //  lnknew.Visible = true;
                  //  lblhead.Text = "Modify Presenter";
                    hdnpresenterid.Value = Request.QueryString["presenterid"].ToString();
                    loadpresenterdetails();
                }
                if (!string.IsNullOrEmpty(Request.QueryString["type"]))
                {
                    divmsg.InnerHtml = "Record submitted successfully!";
                }
                ((HiddenField)this.Master.FindControl("hdnreqlist")).Value = (txtpresentername.ClientID);

            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lblerrmsg.Text = "";
            divmsg.InnerHtml = "";
            Response.Cache.SetExpires(DateTime.Now.AddMinutes(-1));
            if (!Page.IsPostBack)
            {
                objmst = new MasterData();
                lbl_msg = (Label)this.Master.FindControl("lbl_headersite");
                lbl_msg.Text = "Create Contact";
                (this.Master as Site1).SetfNewbutton("Contact");
                filldropdown();
                if (!string.IsNullOrEmpty(Request.QueryString["search"]))
                {
                    lbl_msg.Text = "";
                    string personalid = Request.QueryString["personalid"];
                    lbl_msg.Text = "";
                    DataTable dtengdetails = objmst.GetEVPDetails(Convert.ToInt32(personalid), 6);

                    if (dtengdetails != null)
                    {
                        if (dtengdetails.Rows.Count > 0)
                        {
                            gvrEngagement.DataSource = dtengdetails;
                            gvrEngagement.DataBind();
                        }
                    }
                }

                string scr = "javascript:return comparedate('" + txtdateifhire.ClientID + "','" + txttermanitationdate.ClientID + "','Hire date should be less than termination date!');";
                txtdateifhire.Attributes.Add("onblur", scr);
                txttermanitationdate.Attributes.Add("onblur", scr);
                txtdob.Attributes.Add("onchange", "return checkdatemax('" + txtdob.ClientID + "','date of birth should be less than current date!');");
                if (Request.QueryString["personalid"] != "" && Request.QueryString["personalid"] != null)
                {
                    lbl_msg.Text = "Modify Contact";
                    //lnknew.Visible = true;
                    //lblhead.Text = "Modify Personnel";
                    hdnpersonalid.Value = Request.QueryString["personalid"];
                    loadpersonaldetails();
                }
                if (!string.IsNullOrEmpty(Request.QueryString["type"]))
                {
                    divmsg.InnerHtml = (Request.QueryString["type"].ToString() == "I") ? "Record submitted successfully!" : "Record updated Successfully!";
                }
                ((HiddenField)this.Master.FindControl("hdnreqlist")).Value = (txtfirstname.ClientID + "," + txtcompany.ClientID + "," + txtlastname.ClientID);
            }
        }