E
ebown5
I am programming in vb.net and haven't quite grokked how to accomplish
this task. I am a pretty proficient amateur and guessing that this is a
relatively simple problem for an experienced object oriented
programmer.
I am dynamically adding images to a webpage. Based on the data there
may be 1 to n images on any given page. I want to provide for the
ability to click on the images and direct the user to another url. I am
trying to use imagebuttons for this task.
I am having trouble handling the click event for the imagebuttons
though since they are dynamically added.
To solve this problem I tried to create a custom class called
myimagebutton that inherits from imagebutton. I figured that every time
that I dynamically created an imagebutton that I would dynamically
create an instance of the myimagebutton class instead. Myimagebutton
would have a click event, and I would handle the event accordingly.
Unfortunately, this problem is just beyond my current understanding of
custom classes and events, and the tutorials that I have read are just
not getting through to me.
Could someone please elucidate for me in simple terms how I would
create a click event for my custom class and how I would handle it? Is
creating a custom imagebutton class even the way to solve this issue?
Thanks for any light that you guys can shed on this for me.
Eric
this task. I am a pretty proficient amateur and guessing that this is a
relatively simple problem for an experienced object oriented
programmer.
I am dynamically adding images to a webpage. Based on the data there
may be 1 to n images on any given page. I want to provide for the
ability to click on the images and direct the user to another url. I am
trying to use imagebuttons for this task.
I am having trouble handling the click event for the imagebuttons
though since they are dynamically added.
To solve this problem I tried to create a custom class called
myimagebutton that inherits from imagebutton. I figured that every time
that I dynamically created an imagebutton that I would dynamically
create an instance of the myimagebutton class instead. Myimagebutton
would have a click event, and I would handle the event accordingly.
Unfortunately, this problem is just beyond my current understanding of
custom classes and events, and the tutorials that I have read are just
not getting through to me.
Could someone please elucidate for me in simple terms how I would
create a click event for my custom class and how I would handle it? Is
creating a custom imagebutton class even the way to solve this issue?
Thanks for any light that you guys can shed on this for me.
Eric