.net - Show icons corresponding to the file type in asp.net -
i need show icons corresponding file type. example have "sample.doc" in string, show in anchor tag link make downloadable. link have file name shown below
<a title="sample" target="_blank" href="\files\sample.doc">sample</a>
what need want link shown below
there many filetypes require show on web page. how can achieve this. starting point me continue it.
i (pseudo-code)
foreach(var file in files){ var extension = path.getextension(file) ... <a title="sample" target="_blank" href="\files\sample.doc"> <img src="/images/@(extension).png" /> sample </a> }
Comments
Post a Comment