Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

Using Razor to download file from html attribute

$
0
0

I am currently adding a notification for our customers. They should be able to download a pdf with list of our branches. When I click on the link nothing happens. I don't understand why. I'm using standard MVC approach. I tried to look at the path that is stored in the variable and the file exists there.

Anything I'm missing here?

Edit:

when opening the link in new tab chrome puts "about:blank#blocked" in url (popups enabled)

Thanks for any input

@{
   var path = Server.MapPath(@"~/ToolsModule/Content/Forms/PdfTemplates/PBS/ListOfBranches.pdf");
 }

<div>
   <div>you can find a link to list of all branches <a href="@path"><b>here</b></a></div>
</div>

Viewing all articles
Browse latest Browse all 67411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>