c# - How to use a file from a client in ASP.net? -
i know server cant access hard drive or directories of client, why when hardcode directory application can access file , upload sql database?
just plain button
<asp:linkbutton id="btnimportdata" runat="server" onclick="btnimportdata_click">import spreadsheet</asp:linkbutton> then code behind
protected void btnimportdata_click(object sender, eventargs e) { dbconn.uploadtoexcel(@"c:\users\spadmin\desktop\abi employee list.xlsx"); } then can use file update database , works.
why cant use directories client?
update
the code accesses file on server. regardless of pc use access web server looking on server's c drive.
Comments
Post a Comment