示例#1
0
        // return every timer click - set by timer control on aspx page to be every 1000ms
        protected void Page_PreRender(object sender, EventArgs e)
        {
            try
            {
                // Look at blob container that contains the videos
                // generated by the worker role. Perform a query
                // of the its contents and return the list of all of the
                // blobs whose name begins with the string "videos".
                // It returns an enumerator of their URLs.
                // Place that enumerator into list view as its data source.
                VideoDisplayControl.DataSource = from o in getVideoPlaylistContainer().GetDirectoryReference("samples").ListBlobs()
                                                 select new { Url = o.Uri, Title = getTitle(o.Uri) };

                // Tell the list view to bind to its data source, thereby
                // showing
                VideoDisplayControl.DataBind();
            }
            catch (Exception)
            {
            }
        }