G
Guest
Hi,
I want to display the contents of the folder. I am using a datagrid control
to display Filename, size, last modified, last accessed, download, delete
etc. I have pasted my code below so that you can see where I am making a
mistake.
For some reason when Download button is pressed, sub
articleList_DownloadFile is not getting called. When I click on Delete
button, sub articleList_DeleteFile is getting called.
Thanks again for your reply.
Joe
<form runat="server">
<asp:label runat="server" id="lblMessage" Font-Italic="True"
ForeColor="Red" />
<aspataGrid runat="server" id="articleList" Font-Name="Verdana"
AutoGenerateColumns="False" AlternatingItemStyle-BackColor="#eeeeee"
HeaderStyle-BackColor="Navy" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
DataKeyField="FullName"
OnItemDataBound="articleList_ItemDataBound"
OnDeleteCommand="articleList_DeleteFile"
OnEditCommand="articleList_DownloadFile">
<Columns>
<asp:ButtonColumn Text="Delete" ButtonType="PushButton"
CommandName="Delete" />
<asp:ButtonColumn Text="Download" ButtonType="PushButton"
CommandName="Edit" />
<asp:HyperLinkColumn DataNavigateUrlField="Name" DataTextField="Name"
HeaderText="File Name" />
<asp:BoundColumn DataField="LastWriteTime" HeaderText="Last Write Time"
ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundColumn DataField="Length" HeaderText="File Size"
ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,### bytes}" />
</Columns>
</aspataGrid>
</form>
I want to display the contents of the folder. I am using a datagrid control
to display Filename, size, last modified, last accessed, download, delete
etc. I have pasted my code below so that you can see where I am making a
mistake.
For some reason when Download button is pressed, sub
articleList_DownloadFile is not getting called. When I click on Delete
button, sub articleList_DeleteFile is getting called.
Thanks again for your reply.
Joe
<form runat="server">
<asp:label runat="server" id="lblMessage" Font-Italic="True"
ForeColor="Red" />
<aspataGrid runat="server" id="articleList" Font-Name="Verdana"
AutoGenerateColumns="False" AlternatingItemStyle-BackColor="#eeeeee"
HeaderStyle-BackColor="Navy" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
DataKeyField="FullName"
OnItemDataBound="articleList_ItemDataBound"
OnDeleteCommand="articleList_DeleteFile"
OnEditCommand="articleList_DownloadFile">
<Columns>
<asp:ButtonColumn Text="Delete" ButtonType="PushButton"
CommandName="Delete" />
<asp:ButtonColumn Text="Download" ButtonType="PushButton"
CommandName="Edit" />
<asp:HyperLinkColumn DataNavigateUrlField="Name" DataTextField="Name"
HeaderText="File Name" />
<asp:BoundColumn DataField="LastWriteTime" HeaderText="Last Write Time"
ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundColumn DataField="Length" HeaderText="File Size"
ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,### bytes}" />
</Columns>
</aspataGrid>
</form>