1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SearchVideos.aspx.cs" Inherits="SearchVideos" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Search YouTube</title>
</head>
<body>
<form id="form1" runat="server">
<a href="default.aspx">Your Videos</a>
<a href="MostPopular.aspx">Most Popular</a>
<a href="YourPlaylists.aspx">Your Playlists</a>
<a href="MostCommented.aspx">Most Commented</a>
<b>Search YouTube</b>
<div>
<br />
This will be searching the top rated video feed.<br />
<br />
Video Query: <asp:TextBox ID="VideoQuery" runat="server"></asp:TextBox>
Author:
<asp:TextBox ID="Author" runat="server"></asp:TextBox><br />
<br />
Category:
<asp:TextBox ID="CategoryQuery" runat="server"></asp:TextBox><br />
<br />
Order By:
<asp:DropDownList ID="Relevance" runat="server">
<asp:ListItem Value="relevance">Relevance</asp:ListItem>
<asp:ListItem Value="published">Published</asp:ListItem>
<asp:ListItem Value="viewCount">ViewCount</asp:ListItem>
<asp:ListItem Value="rating">Rating</asp:ListItem>
</asp:DropDownList><br />
<br />
Include Racy?
<asp:CheckBox ID="Racy" runat="server" /><br />
<br />
In Timeframe
<asp:DropDownList ID="Timeframe" runat="server">
<asp:ListItem>All Time</asp:ListItem>
<asp:ListItem>Today</asp:ListItem>
<asp:ListItem>This Week</asp:ListItem>
<asp:ListItem>This Month</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Search" runat="server" Text="Search YouTube" OnClick="Search_Click" /><br />
<br />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SearchYouTubeSource">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:BoundField DataField="Uploader" HeaderText="Uploader" SortExpression="Uploader" />
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
<asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" />
<asp:BoundField DataField="Content" HeaderText="Content" SortExpression="Content" />
<asp:BoundField DataField="WatchPage" HeaderText="WatchPage" SortExpression="WatchPage" />
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="SearchYouTubeSource" runat="server" SelectMethod="Search" TypeName="ListVideos">
<SelectParameters>
<asp:ControlParameter ControlID="VideoQuery" Name="videoQuery" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="Author" Name="author" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="Relevance" Name="orderby" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="Racy" Name="racy" PropertyName="Checked" Type="String" />
<asp:ControlParameter ControlID="Timeframe" Name="time" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="CategoryQuery" Name="category" PropertyName="Text"
Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</form>
</body>
</html>
|