Streamed implementation. Limited input buffer.
[LanSpider.git] / WebSearch / Default.aspx
blob27937ec46e0a034416559c5c6ca304f31c0e3938
1 <%@ Page Title="LanSpider Web Search" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>\r
2 \r
3 <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">\r
4     <h1>LanSpider Web Search</h1>\r
5 </asp:Content>\r
6 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">\r
7 \r
8     <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>\r
9     <asp:Button ID="btnSearch" runat="server" Text="Search" onclick="btnSearch_Click" PostBackUrl=""\r
10         />\r
11     <br />\r
12     <asp:RadioButtonList ID="rblOptions" runat="server" \r
13         RepeatDirection="Horizontal">\r
14         <asp:ListItem Selected="True" Value="0">All</asp:ListItem>\r
15         <asp:ListItem Value="1">Images</asp:ListItem>\r
16         <asp:ListItem Value="2">Video</asp:ListItem>\r
17         <asp:ListItem Value="3">Music</asp:ListItem>\r
18     </asp:RadioButtonList>\r
19     <asp:ListView ID="ListView1" runat="server">\r
20         <ItemTemplate>\r
21             <tr style="">\r
22                 <td>\r
23                     <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />\r
24                 </td>\r
25                 <td>\r
26                     <a runat="server" id="pathLink" href='<%# Eval("path") %>' ><%# Eval("path") %></a>\r
27                 </td>\r
28                 <td>\r
29                     <asp:Label ID="sizeLabel" runat="server" Text='<%# Eval("size") %>' />\r
30                 </td>\r
31                 <td>\r
32                     <asp:Label ID="typeLabel" runat="server" Text='<%# Eval("type") %>' />\r
33                 </td>\r
34             </tr>\r
35         </ItemTemplate>\r
36         <AlternatingItemTemplate>\r
37             <tr style="">\r
38                 <td>\r
39                     <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />\r
40                 </td>\r
41                 <td>\r
42                 <a runat="server" id="pathLink" href='<%# Eval("path") %>' ><%# Eval("path") %></a>\r
43                 </td>\r
44                 <td>\r
45                     <asp:Label ID="sizeLabel" runat="server" Text='<%# Eval("size") %>' />\r
46                 </td>\r
47                 <td>\r
48                     <asp:Label ID="typeLabel" runat="server" Text='<%# Eval("type") %>' />\r
49                 </td>\r
50             </tr>\r
51         </AlternatingItemTemplate>\r
52         <EmptyDataTemplate>\r
53             <table runat="server" style="">\r
54                 <tr>\r
55                     <td>\r
56                         No files was found.</td>\r
57                 </tr>\r
58             </table>\r
59         </EmptyDataTemplate>\r
60         <InsertItemTemplate>\r
61             <tr style="">\r
62                 <td>\r
63                     <asp:Button ID="InsertButton" runat="server" CommandName="Insert" \r
64                         Text="Insert" />\r
65                     <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" \r
66                         Text="Clear" />\r
67                 </td>\r
68                 <td>\r
69                     <asp:TextBox ID="nameTextBox" runat="server" Text='<%# Bind("name") %>' />\r
70                 </td>\r
71                 <td>\r
72                     <asp:TextBox ID="pathTextBox" runat="server" Text='<%# Bind("path") %>' />\r
73                 </td>\r
74                 <td>\r
75                     <asp:TextBox ID="sizeTextBox" runat="server" Text='<%# Bind("size") %>' />\r
76                 </td>\r
77                 <td>\r
78                     <asp:TextBox ID="typeTextBox" runat="server" Text='<%# Bind("type") %>' />\r
79                 </td>\r
80             </tr>\r
81         </InsertItemTemplate>\r
82         <LayoutTemplate>\r
83             <table runat="server">\r
84                 <tr runat="server">\r
85                     <td runat="server">\r
86                         <table ID="itemPlaceholderContainer" runat="server" border="0" style="">\r
87                             <tr runat="server" style="">\r
88                                 <th runat="server">\r
89                                     File name</th>\r
90                                 <th runat="server">\r
91                                     Path</th>\r
92                                 <th runat="server">\r
93                                     Size</th>\r
94                                 <th runat="server">\r
95                                     Type</th>\r
96                             </tr>\r
97                             <tr ID="itemPlaceholder" runat="server">\r
98                             </tr>\r
99                         </table>\r
100                     </td>\r
101                 </tr>\r
102                 <tr runat="server">\r
103                     <td runat="server" style="">\r
104                         <asp:DataPager ID="DataPager1" runat="server">\r
105                             <Fields>\r
106                                 <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="True" \r
107                                     ShowNextPageButton="False" ShowPreviousPageButton="False" />\r
108                                 <asp:NumericPagerField />\r
109                                 <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="True" \r
110                                     ShowNextPageButton="False" ShowPreviousPageButton="False" />\r
111                             </Fields>\r
112                         </asp:DataPager>\r
113                     </td>\r
114                 </tr>\r
115             </table>\r
116         </LayoutTemplate>\r
117         <EditItemTemplate>\r
118             <tr style="">\r
119                 <td>\r
120                     <asp:Button ID="UpdateButton" runat="server" CommandName="Update" \r
121                         Text="Update" />\r
122                     <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" \r
123                         Text="Cancel" />\r
124                 </td>\r
125                 <td>\r
126                     <asp:TextBox ID="nameTextBox" runat="server" Text='<%# Bind("name") %>' />\r
127                 </td>\r
128                 <td>\r
129                     <asp:TextBox ID="pathTextBox" runat="server" Text='<%# Bind("path") %>' />\r
130                 </td>\r
131                 <td>\r
132                     <asp:TextBox ID="sizeTextBox" runat="server" Text='<%# Bind("size") %>' />\r
133                 </td>\r
134                 <td>\r
135                     <asp:TextBox ID="typeTextBox" runat="server" Text='<%# Bind("type") %>' />\r
136                 </td>\r
137             </tr>\r
138         </EditItemTemplate>\r
139         <SelectedItemTemplate>\r
140             <tr style="">\r
141                 <td>\r
142                     <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />\r
143                 </td>\r
144                 <td>\r
145                     <asp:Label ID="pathLabel" runat="server" Text='<%# Eval("path") %>' />\r
146                 </td>\r
147                 <td>\r
148                     <asp:Label ID="sizeLabel" runat="server" Text='<%# Eval("size") %>' />\r
149                 </td>\r
150                 <td>\r
151                     <asp:Label ID="typeLabel" runat="server" Text='<%# Eval("type") %>' />\r
152                 </td>\r
153             </tr>\r
154         </SelectedItemTemplate>\r
155     </asp:ListView>\r
156     <asp:LinqDataSource ID="dsLinq" runat="server" \r
157         ContextTypeName="SearchIndexDataContext" Select="new (name, path, size, type)" \r
158         TableName="FileInfos">\r
159     </asp:LinqDataSource>\r
160     <br />\r
161 </asp:Content>\r