A question about datagrid

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" />
<asp:DataGrid 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>
</asp:DataGrid>
</form>
 

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,922
Messages
2,570,047
Members
46,475
Latest member
RacheleGri

Latest Threads

Top