html - asp.net - Create contatenated href tag in a repeater element -


i have repeater on asp.net page, bound datareader in code-behind. i'd turn 1 of repeater elements href of anchor tag. repeater element name of file, , want user able click on tag download file.

this post got me pretty close; repeater element looks this:

<%#eval("documentname")%> 

and anchor looks this:

<a href= "docs/?<%#eval("documentname")%>"><%#eval("documentname")%></a> 

this opens docs subfolder in directory listing of entire docs folder. want 'open/save file' dialog open when user clicks href, not go separate page lists files in docs directory.

instead of linking page lists files, link actual document. if documents static files in docs folder, , documentname file name, removing question mark link should trick.

<a href="docs/<%#eval("documentname")%>"><%#eval("documentname")%></a> 

note, removed space after href= in link. not sure if typo in question or not.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -