private void LoadVideos() { RelatedContent rc = new RelatedContent(); rc.GetRelatedContentByTypeIDAndPageID(CurrentPage.PageID, 3); uiGridViewVideos.DataSource = rc.DefaultView; uiGridViewVideos.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int pid = 0; if (Request.QueryString["pid"] != null) { try { pid = Convert.ToInt32(Request.QueryString["pid"].ToString()); } catch (Exception ex) { pid = 0; } } if (pid == 0) { Response.Redirect("~/Default.aspx"); } else { Pages page = new Pages(); page.LoadByPrimaryKey(pid); uiLabelTitle.Text = page.ArTitle; Master.PageTitle = page.ArTitle; uiLiteralContent.Text = Server.HtmlDecode(page.ArContent); uiImageMain.ImageUrl = "Images.aspx?Inner=t&Image=" + page.MainImagePath; string pagetype = page.PageType; if (string.IsNullOrEmpty(pagetype)) pagetype = "FFFFF"; tabs_1.Visible = TabContent.Visible = (pagetype[0] == 'T'); // content tabs_2.Visible = TabVideos.Visible = (pagetype[1] == 'T'); // videos tabs_3.Visible = TabFiles.Visible = (pagetype[2] == 'T'); // files tabs_4.Visible = TabArticles.Visible = (pagetype[3] == 'T'); // articles tabs_5.Visible = TabPics.Visible = (pagetype[4] == 'T'); // pics RelatedContent rc = new RelatedContent(); rc.GetRelatedContentByTypeIDAndPageID(page.PageID, 3); uiDataListVideos.DataSource = rc.DefaultView; uiDataListVideos.DataBind(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scroll4", "$(document).ready(function () {$('#scrollbar5').tinyscrollbar();});", true); RelatedContent rcp = new RelatedContent(); rcp.GetRelatedContentByTypeIDAndPageID(page.PageID, 4); uiDataListPics.DataSource = rcp.DefaultView; uiDataListPics.DataBind(); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scroll7", "$(document).ready(function () {$('#scrollbar5').tinyscrollbar();});", true); LoadFilesCats(); LoadCMSCats(); /*RelatedContent rca = new RelatedContent(); rca.GetRelatedContentByTypeIDAndPageID(page.PageID, 1); uiRepeaterCMS.DataSource = rca.DefaultView; uiRepeaterCMS.DataBind();*/ } } }