private void BindBlog() { DataTable dt = new DataTable(); dt = objBlog.GetAllBlogs(); if (dt.Rows.Count > 0) { rptBlog.DataSource = dt; rptBlog.DataBind(); } }
protected void FillGridData() { try { DataView dv = new DataView(); dv.Table = clsobj.GetAllBlogs(); if (strSortExpression != "" && strSortDirection != "") { dv.Sort = strSortExpression + " " + strSortDirection; } GrdBlogList.DataSource = dv; GrdBlogList.DataBind(); if (intPageIndex != 0) { GrdBlogList.PageIndex = intPageIndex; } } catch (Exception ex) { throw ex; } }