P
PL
Hi
I wanted to log a custom message when the user opens a link to a .pdf :
in the .aspx file:
<form runat="server">
....
<a href="file.pdf" OnServerClick="OnDownload" runat="server">link</a>
....
</form>
in the .vb :
Public Sub OnDownload(ByVal sender As Object, ByVal e As System.EventArgs)
Dim anchor As HtmlAnchor
' write special log
....
' open link
anchor=sender
Response.Redirect(anchor.HRef)
End Sub
It works (I have the log and the pdf is opened), but the problem is that by
this way I lose the real link. The link becomes
"javascript:__dopostback(...)" and so the user can't download the pdf file
with 'save as' menu action.
How can I do to let the link be 'file.pdf' and log with server code when the
user clicks it ?
Thanks for any Help
NL
I wanted to log a custom message when the user opens a link to a .pdf :
in the .aspx file:
<form runat="server">
....
<a href="file.pdf" OnServerClick="OnDownload" runat="server">link</a>
....
</form>
in the .vb :
Public Sub OnDownload(ByVal sender As Object, ByVal e As System.EventArgs)
Dim anchor As HtmlAnchor
' write special log
....
' open link
anchor=sender
Response.Redirect(anchor.HRef)
End Sub
It works (I have the log and the pdf is opened), but the problem is that by
this way I lose the real link. The link becomes
"javascript:__dopostback(...)" and so the user can't download the pdf file
with 'save as' menu action.
How can I do to let the link be 'file.pdf' and log with server code when the
user clicks it ?
Thanks for any Help
NL