.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

enter image description here

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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -