Click here to Skip to main content
15,881,781 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

I have one gridview, in which there is one imagebutton column , i bind this image column dynamically with images using gridview_RowDataBound Event from the path stored in table in sql.

But now when i click the imagebutton click some parameters are passed to sql and the path of the image is changed, now what i want is by again fetching the path of the image i want to update the image of the imagebutton of gridview.

Please help me how can i achieve this!!

Krunal Panchal
Monjurul Habib 29-Jul-11 13:51pm    
your question is very confusing. better you share your code.
how the path of the image is changing? please clarify.

1 solution

Use the ItemCommand event when you click the imagebutton.
In ItemCommand event..

dim imgButton as ImageButton
imgButton = ctype(sender,ImageButton)
' Pull your image path from sql store it in a string lsPath
imgButton.ImageUrl = server.mappath(lsPath)

--Thats it.. hope it helps you..
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