Hi, I am using this code to download file from sever. The name of the file is being selected from a dropdownlist web control which items are added from data base (dynamicly). Public Sub on_change(ByVal s As Object, ByVal e As EventArgs) Dim file_name As String
file_name = choise.SelectedItem.Value Dim f As File Dim pass As String Dim full_pass As String pass = Server.MapPath("wordFiles") full_pass = pass & "\" & file_name Response.AddHeader("Content-Disposition", "attachment; filename=" & file_name) Response.WriteFile(full_pass)
Response.End() End Sub After downloading a file I have a problem which is: Any button that I push on the same page gives me again the file which was downloaded a minute before instead of doing what it should do as onclick="something" does any one have an idea
? why ? Thanks , Eran
eranyael
Member
220 Points
44 Posts
dropdownlist
Oct 23, 2003 07:30 AM|LINK