using System;
using System.Linq;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class viewNews : System.Web.UI.UserControl
{
    protected void grdFill()
    {
        LSC_KhateratDataContext db = new LSC_KhateratDataContext();
        var Query = from Row in db.XtblKhateratDefaults
                    select Row;

        GridView1.DataSource = Query;
        GridView1.EmptyDataText = "هیچگونه نوشتاری درج نشده است. لطفا نوشته های خود را وارد فرمائید.";
        GridView1.DataBind();
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        grdFill();
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        grdFill();
    }
}
