c# - Why is my File Path Null using FileUpload in ASP.net? -


why file path nothing when browse file using fileupload? don't want upload file, want directory of file (i'm using file update sql database (xlsx file))

<asp:fileupload id="fileupload" runat="server" height="24px" style="position: static" width="255px" /> <asp:button id="uploadbtn" runat="server" onclick="uploadbtn_click" style="position: static" text="upload" width="82px" /> 

code behind (test "") on uploadbtn_click event

string test = fileupload.filename; 

as can read @ msdn (http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.filename.aspx), filename never contain directory of file.

the software on server never allowed take peek inside clients computer.


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -