dnnstuffadmin posted on February 23, 2010 13:56
The easiest way to accomplish this is to write
your select statement to build the html necessary to provide a link to
the document.
Assuming that the field is named DocumentPath you could do something
like this:
SELECT '<a href="' + DocumentPath + '">Download</a>' AS Url
FROM MyTable
This would give you a single column in a grid, with a link named
Download that points to the document.
In SQLView Pro it's a little easier because you can create a template
that does this more easily but it's doable in either.
In SQLView Pro the template would look something like this:
<table>
[EACHROW]
<tr>
<td><a href="[DocumentPath]">Download</a></td>
</tr>
[/EACHROW]
</table>
and the select statement would just be a simple select from the table
such as SELECT * FROM MyTable
As another example, I'm using the template for all of my downloads on
the download page
(
http://www.dnnstuff.com/download.aspx)
and the templates make it easy to add additional things such as the pop
up box using jQuery when you click the version information etc.