I have a link button as below:
<asp:LinkButton ID="Import" runat="server" Font-Size="Small" Visible="true">Import</asp:LinkButton>
On click of this link button,I want the user to download a .exe file.
I tried this:
string str = @"C:\Users\Documents\ConsoleApplication1\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe";
Process process = new Process();
process.StartInfo.FileName = str;
process.Start();
This works fine in my local machine but the .exe cannot be accessed from the web page once its hosted.I think its possibly because of website security issues (correct me if I am wrong) that it doesn't allow the user to access the .exe location.
This was a little bit of background info.
My question is how do I modify this so that the user can download the .exe to his own machine (since I am not being able to access otherwise)?
Aucun commentaire:
Enregistrer un commentaire