views:

58

answers:

2

Hello,

In my project I'm showing a gridview in which I'hv included a buttonfield...I want to download a file, when user clicks the button inside gridview whose path is stored in database and the file is stored in localfile system...

thanks in advance.

A: 

You can use the RowCommand Event of a gridview to responde to a button click and perform an action.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcommand.aspx

Mathieu
A: 

You can use the RowCommand event of the GridView control. Make sure your button has setup the CommandName and CommandArgument. The CommandName will distinguish between different events handled by the GridView RowCommand event. And the CommandArgument will contain any value you need to send to the GridView RowCommand through the Button click event.

azamsharp