1<%...@ Control Language="C#" AutoEventWireup="true"
2 CodeFile="List.ascx.cs" Inherits="Upload_ListControl" %>
3자료실 리스트<br />
4<asp:GridView ID="ctlUploadList" runat="server"
5 AutoGenerateColumns="false" AllowPaging="True"
6 OnPageIndexChanging="ctlUploadList_PageIndexChanging" PageSize="3">
7 <Columns>
8 <asp:BoundField DataField="Num" HeaderText="번호" />
9 <asp:HyperLinkField
10 DataTextField="Title"
11 HeaderText="제목"
12 DataNavigateUrlFormatString="View.aspx?Num={0}"
13 DataNavigateUrlFields="Num" />
14 <asp:TemplateField HeaderText="파일">
15 <ItemTemplate>
16 <a href='files/<%# Eval("FileName") %>'>
17 <%...# Eval("FileName") %>
18 a>
19 /
20 <asp:HyperLink ID="HyperLink1" runat="server"
21 NavigateUrl='<%# "~/Upload/files/" + Eval("FileName") %>'>
22 <%...# Eval("FileName") %>
23 asp:HyperLink>
24 /
25 <asp:HyperLink ID="HyperLink2" runat="server"
26 NavigateUrl=
27 '<%# "Down.aspx?FileName=" + Eval("FileName") %>'>
28 <img src="images/ext_zip.gif" border="0" alt="다운로드" />
29 asp:HyperLink>
30 ItemTemplate>
31 asp:TemplateField>
32 Columns>
33asp:GridView>
34
35<asp:DropDownList ID="SearchField" runat="server">
36 <asp:ListItem Value="Name">이름asp:ListItem>
37 <asp:ListItem Value="Title">제목asp:ListItem>
38 <asp:ListItem Value="Content">내용asp:ListItem>
39asp:DropDownList>
40<asp:TextBox ID="SearchQuery" runat="server">asp:TextBox>
41<asp:Button ID="btnSearch" runat="server" Text="검색"
42 OnClick="btnSearch_Click" /><br />
43
44<asp:Button ID="btnWrite" runat="server" Text="글쓰기"
45 OnClick="btnWrite_Click" />
46