Collect the most practical webpage special effect code!
listdrives.aspx
< % @page Language = C# %>
< % @import namespace = systemm %>
< % @import namespace = System.io %>
<%
string qdrives = environment.osversion.tostring ();
string qnewline = environment.systemDirectory.tostring ();
string qmo = environment.workingSet.tstring ();
int QTick = ENVIRONMENT.TICKCOUNT;
qtick/= 60000;
string [] AchDrivers = Directory.getLogicaldrives ();
int nnumofdrives = ACHDRIVES.Length;
response.write (Your system is :);
response.write (qdrives);
response.write (<br>);
response.write (Your available memory is :);
response.write (qmo);
response.write (<br>);
Response.write (has been restarted last time);
response.write (qtick.tostring ());
Response.write (minute);
response.write (<br>);
response.write (<br>);
response.write (<br>);
response.write (View your disk :);
response.write (<ul>);
for (int i = 0; I <nnumofdrives; i ++)
{{
response.write (<li> <a href =/listdir.aspx? Dir =);
response.write (server.urlencode (acHDrives [i]));
response.write (/> + Achdrives [i]);
response.write (</a> <br>);
}
response.write (</ul>);
%>
listdir.aspx
< % @page Language = C# Debug = TRUE %>
< % @import namespace = System.io %>
<%
string strdir2list = request.querystring.get (dir);
Directory thisone = null;
try
{{
thisNe = New Directory (Strdir2List);
// AUSLESEN DER EIGENSCHAFTEN DER VERZEICHNISSES
response.write (<p> Create time: + thisNe.Creation.tostring () + </p>);
Directory [] Subdirectories = thisNe.getDirectories ();
response.write (<ul>);
Response.write --------------------------------------------------------------------------------------------);
response.write (<br>);
for (int i = 0; I <subdirectories.length; i ++)
{{
response.write (<li> <a href =/listdir.aspx? Dir =);
response.write (server.urlencode (subdirectories [i]. FullName));
response.write (/> + subdirectories [i] .Name);
response.write (</a> <br>);
}
response.write (</ul>);
file [] theFiles = thisNe.getFiles ();
response.write (<ul>);
response.write(-------------------------------文件-------------- --------------);
response.write (<br>);
for (int i = 0; I <the <the <thefiles.length; i ++)
{{
response.write (<li> <a href =/showfile.aspx? file =);
response.write (server.urlencode (theFiles [i]. FullName));
response.write (/> + theFiles [i] .Name);
response.write (</a> <br>);
}
response.write (</ul>);
}
catch (Exception E)
{{
response.write (This function cannot be implemented for the following reasons:);
response.write (e.tostring () +);
response.end ();
}
%>
showfile.aspx
<% @page Language = C# Debug = TRUE%>
< % @import namespace = System.io %>
<html>
<head> <Title> File Info </Title> </Head>
<body>
<%
string strfile2show = request.querystring.get (file);
file thisNe = new file (strfile2show);
%>
<Table>
<tr> <td> File name: </td> <td> <%= thisone.name%> </td> </tr>
<ter> <td> Full name: </td> <td> <%= Thisone.fullname%> </td> </tr>
<ter> <TD> File Creating Date: </td> <td> <%= Thisone.CreationTime.tostring ()%> </td> </tr>
<ter> <td> File size: </td> <td> <%= thisone.length.tostring ()%> bytes </td> </tr>
<ter> <TD> Last use time: </td> <td> <%= thisNe.lastac sensesstime.tostring ()%> </td> </tr>
<ter> <TD> Last modification time: </td> <td> <%= thisone.lastwritetime.tostring ()%> </td> </tr>
</table>
<%
streamReader thereader = thisNe.opentemt ();
char [] TheBuffer = New Char [1000];
int Nream = TheReader.readBlock (TheBuffer, 0, 1000);
response.write (<br>);
response.write (File content preview :);
response.write (<br>);
response.write (<pre>);
response.write (server.htmlencode (New String (TheBuffer, 0, NRAD));
response.write (</pre>);
%>
</body>
</html>
It is enriching management functions, integration uploading, modification, deletion and other management functions
I wonder if there is so much time
Work hard, friends