Click here to Skip to main content
15,790,723 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i display clickable images stored in a folder and image information data from a database like sql server on a page using gridview in

1 solution

Hi IRFAN3132!

you have to do this at the RowDataBound event of your GridView

([^] )

This event are called for every row in the datasource.

There insert the logic to put "" html tags before and after of your image.

At the tag you can choice from the "target" attribute or call a jQuery/javascript with the "onclick" attribute.

Other way is to put an ImageButton into the grid and bind it. But you will get a postback at click.

I hope this help.
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