[转]asp.net文件浏览器代码
前台代码:
<%@ Page Language="C#" CodeFile="webBrowser.aspx.cs" Inherits="webBrowser" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head id="Head1" runat="server">
<title>文件浏览器</title>
</head>
<body>
<form
id="form1" runat="server">
<div
style="padding: 5px; border-right: 2px groove; border-top: 2px
groove; font-size: 12px;
z-index:
101; left: 16px; border-left: 2px groove; border-bottom: 2px
groove;
font-family:
Verdana;">
<asp:Button
ID="btnUp" runat="server" Text=" 向 上 " OnClick="btnUp_Click"
/>
<asp:Label
ID="lblCurrentDir" runat="server"
Text="当前目录:"></asp:Label>
<table
style="width: 100%">
<tr>
<td
valign="top" style="width: 786px; height:
222px">
<asp:GridView
ID="gridDirList" runat="server"
OnSelectedIndexChanged="gridDirList_SelectedIndexChanged"
Width="418px"
GridLines="None" CellPadding="0" CellSpacing="1"
DataKeyNames="FullName">
<HeaderStyle
Font-Bold="True" BackColor="#CCFFFF"
HorizontalAlign="Left"></HeaderStyle>
<Columns>
<%@ Page Language="C#" CodeFile="webBrowser.aspx.cs" Inherits="webBrowser" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head id="Head1" runat="server">
</head>
<body>