i trying open file on web app retrieving file path sql database
here code open file when double click index in listbox.
protected sub userdoubleclick() dim selectedpath string try fileconnection.open() selectedfile = filelistbox.selectedvalue 'takes selected items listbox , searches database file 'and open file user filecommand.commandtext = "select filepath importedfiles filename = '" & selectedfile & "'" filedatareader = filecommand.executereader while filedatareader.read selectedpath = filedatareader.getvalue(0) loop system.diagnostics.process.start(selectedpath) catch ex exception end try fileconnection.close() end sub when run on local pc works fine when publish server wont open file.
system.diagnostics.process.start(selectedpath) open file on machine running web application; in other words, opening on local machine when running locally, opening on server when deployed. isn't going work.
Comments
Post a Comment