Introduction
This code is provide a download functionality in Asp.Net with c#..
So to download any file in ASP.Net using C# import this namespace
Namespace
using System.Net;
Use the code
First we create source file using Button, TextBox and Label Control..
Enter path in Textbox
Example:-E-Book/HiFriends.doc
and download your file in your pc.
<body>
<form
id="form1"
runat="server">
<div>
<table
class="style1">
<tr>
<td
style="text-align:
right">Select
Path :- </td>
<td><asp:TextBox
ID="txtFileName"
runat="server"
Width="201px"></asp:TextBox></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><asp:Button
ID="Button1"
runat="server"
onclick="Button1_Click"
Text="Download"
/></td>
</tr>
</table>
</div>
</form>
</body>

Join the conversation! Your thoughts help the community grow.