public void Bind(int Page) { int NumberOfVideos = Video.GetVideosCountByMemberID(member.MemberID); videos = Video.GetVideosByMemberIDWithJoinPager(member.MemberID, Page); if (videos.Count == 0) { NoVideosMessage = "<p>You have no videos in your account. To upload please use the big blue button to the right!"; NoVideos = true; } else { NoVideos = false; } VideoRepeater.DataSource = videos; VideoRepeater.DataBind(); Pager pager = new Pager("/myvideos/", Page, NumberOfVideos); pager.PageSize = 10; PagerHTML = pager.ToString(); }
public void getdata() { DataTable dt = new DataTable(); using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["conn"].ConnectionString)) { SqlCommand cmd = new SqlCommand("Select Filename from VideoFile", con); con.Open(); dt.Load(cmd.ExecuteReader()); } VideoRepeater.DataSource = dt; VideoRepeater.DataBind(); }