How to assign images to datagrid control dynamically using c#?

Posted by ttarakarajesh-8732 under ASP.NET on 8/19/2011 | Points: 10 | Views : 2135 | Status : [Member] | Replies : 3
Hi All,

I am using Visual Studio 2005 and trying to create Image controls dynamically. and assigning those controls to DataGrid control.
Can anybody tell me how to handle image control click event when control creates dynamically. Can anybody respond to this ASAP.
Any kind of suggestion is appreciable.

Thanks in Advance,
Tarak




Responses

Posted by: Vuyiswamb on: 8/20/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
if the image is comming from the database base , you only need a template field as i did in this article

http://www.dotnetfunda.com/articles/article731-how-to-consume-other-sites-rss-in-aspnet-.aspx

Thank you for posting at dotnetfunda

Vuyiswa maseko

Thank you for posting at Dotnetfunda
[Administrator]

ttarakarajesh-8732, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: ttarakarajesh-8732 on: 8/22/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Vuyiswa,

Thanks for your reply. Here I am unable to handle the image buttons Click event. Because all those image controls were creating dynamically . Can you tell me where do i write code for those controls.

Thanks,
Tarak

ttarakarajesh-8732, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 8/22/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
So you want to put it in a image button , can i see your html that describe your template column that contains the image button.

Thank you for posting at Dotnetfunda
[Administrator]

ttarakarajesh-8732, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response