ASP.NET 3.5 BasicsIf you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 3.5 Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
I'm using the standard FileUpload control and returning the result back to the server via the javascript submit() method. When I run it I get the following error:
htmlfile: Access is denied
I ran across this from MS: http://support.microsoft.com/kb/892442
and according to it I should be OK. Here's the code I'm using for getting the user's file:
function ConfirmFile()
{
document.getElementById("hdn5").value=window.confi rm('The following file will be saved to the database. Press OK if this is correct.' + '\n' + '\n' + document.getElementById("FileUpload1").value);
document.forms(0).submit();
}
function FileUpload()
{
document.getElementById("FileUpload1").click();
if(document.getElementById("FileUpload1").value)
{ConfirmFile();}
The FileUpload function is called first and the file is then confirmed by the ConfirmFile function. When the confirm box is displayed the filename with the complete path down to the root directory is shown. Unless I missed something per that MS article I should be OK.