ASP code

L

Lion

Could someone help me please.

I'm using a file called list.aspx to list the content of directories which
works fine. What I need its when the files get listed in the IE I would
like to have a two buttons next to the file name one to SAVE file and the
one to DELETE the file.

Thanks for your help.

This is the code in the file.

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 1</title>
</head>

<body>Please read the disclaimer at the bottom of this e-mail



<p><b><font face="Tahoma" color="#66CCFF" size="4">C drive
Stuff</font></b></p>

<%@ Import Namespace="System.IO" %>
<script language="VB" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
Dim dirInfo as New DirectoryInfo(Server.MapPath(""))

articleList.DataSource = dirInfo.GetFiles("*.pdf")
articleList.DataBind()
End Sub
</script>

<asp:DataGrid runat="server" id="articleList" Font-Name="Tahoma"
AutoGenerateColumns="False" AlternatingItemStyle-BackColor="#eeeeee"
HeaderStyle-BackColor="#66ccff" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="10pt" HeaderStyle-Font-Bold="True">
<Columns>
<asp:HyperLinkColumn DataNavigateUrlField="Name"
DataTextField="Name"
HeaderText="File Name" />

<asp:BoundColumn DataField="LastWriteTime" HeaderText=
"Last Write Date"
ItemStyle-HorizontalAlign="Center " DataFormatString="{0:d}" />

<asp:BoundColumn DataField="LastWriteTime" HeaderText=
"Last Write Time"
ItemStyle-HorizontalAlign="Center " DataFormatString="{0:t}" />

<asp:BoundColumn DataField="Length" HeaderText="File Size"
ItemStyle-HorizontalAlign="Right"
DataFormatString="{0:#,### bytes}" />
</Columns>
</asp:DataGrid>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,836
Messages
2,569,748
Members
45,545
Latest member
rapter____0

Latest Threads

Top