protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (!HttpContext.Current.User.Identity.IsAuthenticated)
            {
                Response.Redirect("~/Account/Login.aspx");
            }

            DropDownList_Categories.DataBind();
            DropDownList_Categories.Items.Insert(0, new ListItem(" اختر التصنيف", "-1"));
        }

        ArticlesList.DataBind();
        if (ArticlesList.Items.Count == 0)
        {
            div_show.Visible = false;
        }
        else
        {
            div_show.Visible = true;
        }
        ArticlesList.DataBind();
        hideNullImage();
    }
    protected void Del(object sender, EventArgs e)
    {
        string con = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;

        using (SqlConnection Conn = new SqlConnection(con))
        {
            SqlCommand cmd = new SqlCommand("dbo.DeleteArticles", Conn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@ID", ((Button)sender).CommandArgument);
            Conn.Open();
            cmd.ExecuteNonQuery();
            Conn.Close();
        }
        ArticlesList.DataBind();
        DropDownList_Categories.DataBind();
        this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('تم مسح المقال')", true);
    }