User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
I have an asp.net application which allows user to download PDF files. but instead of downloading it, the browser opens the file with unreadable block characters.
Download Code
ProtectedSub btn_dwnd_Click(ByVal sender AsObject,ByVal e As System.EventArgs)Handles btn_dwnd.Click
cn.Open()
cmd.CommandText ="Select * from Syllabus where file_name ='"& txtdwd_file.Text &"'"
cmd.Connection = cn
dr = cmd.ExecuteReader
DoWhile dr.Read
Response.WriteFile(dr("file_name"))Loop
cn.Close()EndSub
I am trying to download my uploaded pdf file in my project's root directory D:\OLMS when I click download unreable characters opens up in browser (square characters). I think it opens up pfd file in browser
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
3 years ago
I have an asp.net application which allows user to download PDF files. but instead of downloading it, the browser opens the file with unreadable block characters.
Download Code
I am trying to download my uploaded pdf file in my project's root directory
D:\OLMSwhen I click download unreable characters opens up in browser (square characters). I think it opens up pfd file in browserUpload Code