Hi all,
I want to list x no. of files and on click it as to be downloaded and saved in the path required by the user.
Can you please help me to solve the issue.
Thanks
Prajwal
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Subhendu DeRank #1,108 · 1.7K reputationPosted Dec 19, 2010, 7:46 PM EST
prajwal kp11 reputationPosted Dec 20, 2010, 12:02 AM EST
On click of a link it as to be downloaded.
Waiting for your reply
Subhendu DeRank #1,108 · 1.7K reputationPosted Dec 20, 2010, 1:26 AM EST
====
CodeBehind
========
namespace PracticeWeb
{
public partial class WebForm3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
IList
{
new clsFiles{ FileName="One.xlsx",FilePath=@"./SampleFolder/1.xlsx",FileType="xlsx"},
new clsFiles{ FileName="Two.docx",FilePath=@"./SampleFolder/2.docx",FileType="docx"},
new clsFiles{ FileName="Three.pdf",FilePath=@"./SampleFolder/3.pdf",FileType="pdf"},
new clsFiles{ FileName="Four.pptx",FilePath=@"./SampleFolder/4.pptx",FileType="pptx"},
};
ListView1.DataSource = _files;
ListView1.DataBind();
}
}
}
public class clsFiles
{
public string FileName { get; set; }
public string FilePath { get; set; }
public string FileType { get; set; }
}
}
Thanks.....
Sam HobbsRank #107 · 20.5K reputationPosted Dec 20, 2010, 2:09 AM EST
Krishna GaradRank #191 · 12.8K reputationPosted Dec 21, 2010, 12:47 AM EST