Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting ImageUrl programatically

Status
Not open for further replies.

nickmollberg

Programmer
Aug 2, 2004
29
US
Hello all,
I'm trying to find the syntax for programatically setting the url of an image upon page load.
Image1.ImageUrl = "is the wrong syntax, and I can't seem to find how to set this attribute in C#.

Any suggestions?
 
hey pwilson, thanks for the post.
I saw that, but I need to set this inside the C# code (so i can dynamically change the URL based on a number passed to the page when it opens), not the HTML.
sorry, should have said something.
 
you'll have to do something like this

Code:
image1.image = image.fromfile( "[URL unfurl="true"]http://myserver.com/1.jpg");[/URL]

BTW I guessed the image was a picturebox.


Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top