Click here to Skip to main content
15,867,860 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how displaying varbinary data as images or pdf or rar or docx ..in a gridview
i want show link for download from db
Posted
Comments
Nandakishore G N 13-Apr-13 4:58am    
what have you done till now paste it.

1 solution

Yous should add for example an image button in that gridview column, that is linked with the action "ManageFileLink" for downloading and/oropenening the file by using Java Script like in in thext example:

protected void _contactsGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowIndex < 0)
return;
//
DataRow dataRow = ((DataRowView)e.Row.DataItem).Row;
int yourDataID = (int)dataRow["ID"];
//
ImageButton fileLinkButton = (ImageButton)e.Row.FindControl("_fileLinkButton");
fileLinkButton.Attributes.Add("onClick", "ManageFileLink('" + yourDataID + "');return false;");

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900