Question

I want to add to table cell in asp table link to file, which is in application folder and is a word document (.docx). How can I add this link here?

...
<asp:TableRow>
<asp:TableCell> here I want to add link to file in application folder Content/Files/document.docx </asp:TableCell>
</asp:TableRow>

Thx.

Was it helpful?

Solution

What about use link element? <a href="Content/Files/document.docx">document</a>.

If app folder is not accessible directly you have to create handler to provide content of this file and use the Server.MapPath method to properly locate the file:

Server.MapPath("~/Content/Files/document.docx")

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top