|
Hi, I have uploaded files to a folder on my computer and everything works fine. when I try to display the content of the file, I use this code:
Dim CNAME as String = Server.MapPath("..\uploaded_files\" & oComm.Parameters( "@c_randName" ).Value )
Dim oStreamReader as StreamReader
oStreamReader = File.OpenText(CNAME)
Dim fileContent as String = oStreamReader.ReadToEnd()
lblOutput.Text = fileContent
oStreamReader.Close()
this code only reads and display files with 'txt' extention, it doesn't disply 'doc' files. How can I change the code so that it can read and display .doc files correctly?
Many thanks
|
|
|
|
|
|
|
|
|
|