How to allow the user to select an input file for my SQL AdventureWorks web application?
I have a SQL and VS 2008 web application that I need to capture the full file path (directories and file name) from the selected file on the client computer. And I want the user to be able to run this application from a Mozilla Firefox browser. This is the trick cause IE supports file path but apparently not Firefox.
So user selects a file and then clicks on one of the buttons which trans开发者_JAVA百科fers control to my code for processing. So how do I get its file path? I can get the file name, but not the path. Maybe problem is that while testing this web app, I am using the server instead of client machine. And I learned that on a server you cannot read the full file path due to security concerns. Is this true?
If I just want this to work on client machine, which method/class do you recommend? And then how can I test it?
My web app allows the user to select an input file and then map columns from the input .MDF file with columns from the selected Adventureworks table. Finally, after they click on the "Append" button, it adds rows from the input file to that table. So I want to capture the path info after they click this button.
For Firefox, the most likely solution is here:
How to get the file path from HTML input form in Firefox 3
精彩评论