When you add an Image programmatically...

  • Thread starter Thread starter Rob Meade
  • Start date Start date
R

Rob Meade

Hi all,

I want to add an Image programmatically, but it needs to be a hyperlink - so
do I add a Hyperlink object and then set its 'text' to be the "<img src="
etc or do I add a hyperlink and add a control to that which is the image??

Any info appreciated,

Regards

Rob
 
Ooow - just one thought though - can you also set the images width, height
and border settigns??
 
...
I don't believe you can with the ImageUrl method. If you want to you will
most likely need to do what you initially said. That is, set the text to be
'<img height="..." width="..." src="...">'

Or do a new Image object and then add that object via the controls.add
etc...thats what I've got at the mo - seems to be ok and gives the extra
functionality ..

Cheers for that earlier snippet though - I've added that to my little code
respository to use where I dont need to be so specific with the images
attributes :o)

Reg's

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top