Ejemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                var blg = (from b in db.TBLBLOCG
                           join c in db.TBLCATEGORY
                           on b.BLOGCATEGORY equals c.CATID

                           join t in db.TBLTYPE
                           on b.BLOGTYPE equals t.TYPEID
                           where b.BLOGBASLIQ.Contains(txtSearch.Text) || c.CATNAME.Contains(txtSearch.Text) || t.TYPENAME.Contains(txtSearch.Text)

                           select new
                {
                    BLOGID = b.BLOGID,
                    BLOGBASLIQ = b.BLOGBASLIQ,
                    BLOGTAARIX = b.BLOGTAARIX,
                    BLOGMEDIA = b.BLOGMEDIA,
                    BLOGTYPE = t.TYPENAME,
                    BLOGCATEGORY = c.CATNAME
                }).ToList();

                RepCatBlog.DataSource = blg;
                RepCatBlog.DataBind();
            }
            catch (Exception ex)
            {
                Label1.Text = ex + " Tapılmaı";
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id  = Convert.ToInt32(Request.QueryString["CATID"]);
            var cat = db.TBLBLOCG.Where(m => m.BLOGCATEGORY == id).ToList();

            RepCatBlog.DataSource = cat;
            RepCatBlog.DataBind();
        }