protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack == false)
            {
                string id = "";
                id = (string)(Session["ID"]);
                int userID = Int32.Parse(id);
                //userID = Int32.Parse(Request.QueryString["userid"]);
                imgservice.ImgWebService svc = new imgservice.ImgWebService();
                DataSet workDS = new DataSet();
                workDS = svc.getRecordsByUser(userID);

                imgData.DataSource = svc.getRecordsByUser(userID);
                imgData.DataBind();
            }
            bool val1 = (System.Web.HttpContext.Current.User != null) && System.Web.HttpContext.Current.User.Identity.IsAuthenticated;
            if (val1 == true)
            {
                lblUser.Visible = true;
                lblUser.Text = Context.User.Identity.Name;
                lblLogin.Visible = false;
                lblGallery.Visible = true;
                lblLogout.Visible = true;
                lblChangePassword.Visible = true;
                lblProfile.Visible = true;

            }
            else
            {
                lblUser.Text = "";
                lblUser.Visible = false;
                lblLogin.Visible = true;
                lblLogout.Visible = false;
                lblGallery.Visible = false;
                lblChangePassword.Visible = false;
                lblProfile.Visible = false;
            }
        }
        protected void imgData_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string Id = "";
            Id = (string)(Session["ID"]);
            int userID = Int32.Parse(Id);
            imgservice.ImgWebService svc = new imgservice.ImgWebService();
            string rowIndex = e.CommandArgument.ToString();
            int id = Int32.Parse(imgData.DataKeys[Int32.Parse(rowIndex)].Value.ToString());
            if (e.CommandName == "deleteCommand")
            {
                svc.deleteOneImageRecord(id);
                
               DataSet workDS = new DataSet();
               workDS = svc.getRecordsByUser(userID);


               imgData.DataSource = svc.getRecordsByUser(userID);
               imgData.DataBind();
            }
            {
            }
        }