I have to download pdf file using link button that is binded with grid view. I have uploaded pdf into database table as in varbinary format. The given below table cad\_file column contains pdf files.
While clicking "version\_no" drop down list, I have to bind pdf and all other datas with gridview. And by click on that I want to download pdf. How can I do that. Help me to find a proper solution. Thank you.

Code:

```
protected void ddlVersionNo_SelectedIndexChanged(object sender, EventArgs e)
    {
        ShadingAnalysisDataSetTableAdapters.tbl_CadFileUploadTableAdapter cd;
        cd = new ShadingAnalysisDataSetTableAdapters.tbl_CadFileUploadTableAdapter();
        DataTable dt = new DataTable();
        dt = cd.GetGvCad2(ddlSiteID.SelectedValue, int.Parse(ddlVersionNo.SelectedValue));
        gvCadPdf.DataSource = dt;
        gvCadPdf.DataBind();
    }

```

SQL:

```
SELECT Id, District, SiteName, Site_ID, Created_Date, Created_By, State, Updated_Date, Updated_By, Version_Status, Version_No, Cad_File, Cad_File_Name FROM tbl_CadFileUpload WHERE (Site_ID = @Site_ID) AND (Version_No = @Version_No)

```

ASPX:

![enter image description here](https://i.stack.imgur.com/iQ5Vh.jpg)

![enter image description here](https://i.stack.imgur.com/YoTCc.jpg)

DB:

![enter image description here](https://i.stack.imgur.com/gaDEL.jpg)

ScreenShot1:

![enter image description here](https://i.stack.imgur.com/Nzia4.jpg)

ScreenShot2:

![enter image description here](https://i.stack.imgur.com/qti9X.jpg)