public void blogss() { var category = from pst in db.soptions where pst.disc == "category" orderby pst.name ascending select pst; Listcategory.DataSource = category; Listcategory.DataBind(); lblblog.Text = "Category"; string frm = Request.QueryString["frm"].ToString(); switch (frm) { case "req": string dis = Request.QueryString["retrive"].ToString(); var viewcategory = db.sp_search_categorypost(dis.ToString()); ListView_blog.DataSource = viewcategory; ListView_blog.DataBind(); break; } }
public void blogss() { var post = from pst in db.viewposts where pst.status == "Publish" orderby pst.dte ascending select pst; ListView_blog.DataSource = post; ListView_blog.DataBind(); string YourText = lblcontent.Text; if (YourText.Length > 50) { YourText = YourText.Substring(0, 50); YourText += "<a href=''>... Read more</a>"; Label1.Text = YourText.ToString(); } var category = from pst in db.soptions where pst.disc == "category" orderby pst.name ascending select pst; Listcategory.DataSource = category; Listcategory.DataBind(); }
public void category() { var categorylist = from pst in db.soptions where pst.disc == "category" orderby pst.name ascending select pst; Listcategory.DataSource = categorylist; Listcategory.DataBind(); }