how to give a link to download a pdf file in asp.net c#

Source Code:-


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="downloadlink.aspx.cs" Inherits="downloadlink" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    Here You can downlaod Dot.net book in PDF format&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
        <a href="PDF_Files/dotnet.pdf" target="_blank"> Download</a>
    </div>
    </form>
</body>
</html>

Note :- you need to create a folder with PDF_Files  name .



Out-put:-
how to give a link to download a pdf file in asp.net c# how to give a link to download a pdf file in asp.net c# Reviewed by NEERAJ SRIVASTAVA on 12:10:00 PM Rating: 5

1 comment:


  1. This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing...
    Regards,
    DOT NET Training Institutes in Chennai|DOT NET Training in Chennai

    ReplyDelete

Powered by Blogger.