Download link in asp.net mvc -
i have uploaded document asp.net mvc 2 application application domain. there directory name "docs". want create link download document application . how that?
edited:
i taking link database. "item.downloadpath". want check value null or not .i can <% if (item.downloadpath!= null) %> put as: <% if (item.downloadpath!= null) %> ">, giving error
edited:- answers , tried these code working doc , docx document . if uploads .txt or image .jpg opens in browser. should ask download. have ?
<a href="<%= url.content("~/docs/documentname.doc") %>"> download </a>
should work.
Comments
Post a Comment