Response.Redirect problem... 
Author Message
 Response.Redirect problem...

I'm trying to log each access/download of a pdf file.  When the user selects
the link, instead of being a link to the pdf file, it calls another asp script
which logs the download into the database then uses Response.Redirect to
actually access/download the file.

This seems to work fine using Netscape and IE3, but IE4 & IE5 seems to download
the pdf file in segments and logs the download several times.

I'm using IIS5/WIN2kSever.  Below is a snippet of code, does anyone have a
better way of doing this?

Thanks.

Dim DbConn, SQL, RS, fname, description, dl_type

  fname = Request.QueryString("Filename")

  dl_type = Request.QueryString("Type")

  description = Request.QueryString("Description")

  Set DbConn = Server.CreateObject("ADODB.Connection")

  DbConn.Open "dsn=DOWNLOADED;uid=xxxx;pwd=xxxxx"

  SQL = "INSERT INTO downloaded (username, file_type, file_desc, file_name,
dl_date) values (" _
 & "'" & Session("User") & "', " _
 & "'" & dl_type & "', " _
 & "'" & description & "', " _
 & "'" & fname & "', " _
 & "'" & Now & "')"
  RS = DbConn.execute(SQL)
  DbConn.Close

 Response.Redirect fname



Sat, 30 Nov 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Response Redirect problem

2. Response.Redirect problem

3. Response.redirect problem

4. Response.Redirect problem

5. Response Redirect doesn't Work - No me funciona Response Redirect

6. problem with response.redirect

7. Response.Redirect + Netscape Browser + StyleSheets = Problem!

8. problem with response.redirect

9. Style Sheet problem with response.redirect

10. Response.Redirect + Netscape Browser + StyleSheets = Problem!

11. problem with response.redirect and forms

12. Problem Launching RealPlayer After Response.Redirect

 

 
Powered by phpBB® Forum Software