Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 26, 2012 04:49 AM by nijhawan.saurabh
Apr 26, 2012 04:23 AM|LINK
Actually I am uploading a file by using file upload control. After successful upload, when I am viewing that page then at that time I want to show that uploaded file on the page which will have the options to download it too. Please help me out on this.
Apr 26, 2012 04:31 AM|LINK
you can store the image path in database and asssign that path to a hyperlink
<asp:HyperLink ID="linkdld" runat="server" Text="Download" Target="_blank" />
At Code Behind assign
linkdld.navigateurl="Your File path"
Apr 26, 2012 04:49 AM|LINK
Many options for doing this:
1. Generate dynamic links to files being uploaded and display them in a list or Gridview for example.
HyperLink DynLink = new HyperLink();
DynLink.ID = "DynLink";
DynLink.Text = "This Link Is been Created Dynamically from code behind";
DynLink.NavigateUrl = "~/Images/1.jpeg";
DynLink.Target = "_blank";
2.Downloading a File with a Save As Dialog in ASP.NET
3. Or you can diaplay all files in a directory using this: