How to Add a linked image in datagrid
-
Hi all I have a datagrid, which holds item name, item price, and its image(all from SQL Server database), what I need is when the user clicks on the image, I need the (id) for the item to be carried to the new page where I want to show more details about the item (expiry date, ...) regards
-
Hi all I have a datagrid, which holds item name, item price, and its image(all from SQL Server database), what I need is when the user clicks on the image, I need the (id) for the item to be carried to the new page where I want to show more details about the item (expiry date, ...) regards
Hi You can add an imagebutton in the template column and set its ImageURL to the image you wish to display. Then, set the imagebutton's CommandName to the itemID and in its Click event, use the commandname as querystring to navigate to another page and display that id's details... Hope it helps you.. ~VSree
-
Hi all I have a datagrid, which holds item name, item price, and its image(all from SQL Server database), what I need is when the user clicks on the image, I need the (id) for the item to be carried to the new page where I want to show more details about the item (expiry date, ...) regards
Vsree has said a nice way, we have one more way using html controls. use a anchor tag and inside that use the image tag, set the image src to the image path and href of anchor tag to the redirection path. if you use this way, no need of writting any code to the page. but you have to use the template column any how. cheers asithangae
-
Hi You can add an imagebutton in the template column and set its ImageURL to the image you wish to display. Then, set the imagebutton's CommandName to the itemID and in its Click event, use the commandname as querystring to navigate to another page and display that id's details... Hope it helps you.. ~VSree
-
Vsree has said a nice way, we have one more way using html controls. use a anchor tag and inside that use the image tag, set the image src to the image path and href of anchor tag to the redirection path. if you use this way, no need of writting any code to the page. but you have to use the template column any how. cheers asithangae
-
Vsree has said a nice way, we have one more way using html controls. use a anchor tag and inside that use the image tag, set the image src to the image path and href of anchor tag to the redirection path. if you use this way, no need of writting any code to the page. but you have to use the template column any how. cheers asithangae
-
Hi You can add an imagebutton in the template column and set its ImageURL to the image you wish to display. Then, set the imagebutton's CommandName to the itemID and in its Click event, use the commandname as querystring to navigate to another page and display that id's details... Hope it helps you.. ~VSree