i show the all files in the folder in following way
first create Repeater
<asp:repeater id="rptrFiles" runat="server" onitemcommand="rptrFiles_ItemCommand">
<itemtemplate>
<tr style="background-color: #f5f5f5; height: 20px;">
<td align="left" style="padding-removed 15px;">
<asp:linkbutton id="LinkButton1" commandname="download" commandargument="<%# Eval("FullName")%>">
runat="server" Style="text-align: center;" Text='<%# Eval("Name")%>' />
</asp:linkbutton></td>
</tr>
</itemtemplate>
</asp:repeater>
after in cs write the binding
private void GetFilesAndFolder()
{
DirectoryInfo dir = new DirectoryInfo(Server.MapPath("~/FileUpload/ZipFile"));
FileInfo[] file = dir.GetFiles("*", SearchOption.AllDirectories);
rptrFiles.DataSource = file;
rptrFiles.DataBind();
}
and then
protected void rptrFiles_ItemCommand(object source, RepeaterCommandEventArgs e)
{
string fullpath = e.CommandArgument.ToString();
string path = Path.GetFileName(fullpath);
string data = "~/FileUpload/ZipFile/" + @"/" + path;
Response.Redirect(data);
}
it will download the content of folder.
now its your depend to show the files in the folder or thar perticular folder
Thank U
@Chetanv@