I am inherited a vb.net website and am trying to add a page that allows downloading .pdf files from the server.
This was my original attempt as doing this: Clickable Link Not appearing on page from generated anchor tag and it failed because I am generating a anchor tag in javascript with the runat="server"
.
I now understand why that does not work.
So, my question has changed to: If I have a simple anchor tag like this:
<a href='download.aspx?type=inspection&file=NNNNNN.pdf'>Download NNNNNN.pdf</a>`
What does download.aspx and download.aspx.vb look like?
Do I need to change anything in IIS to make it aware that is a valid URL?
I am asking this question on how to do this without asp controls because the examples I find on the web all rely on asp controls.
I am a Windows/IIS/vb.net noob so please be as specific as you can in the answer.
This question Reading a binary file and using Response.BinaryWrite() does not answer my question because it is code fragments and not entire files. I am too new to vb.net to be confident to put those fragments together into a file and debug it.