image population

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an image control which I populate using an api url.

For example http://getimage.com?id=1234

where 1234 is a variable I am passing in.

My problem is that the id of the image could be 001234 or 01234. However, I
don't know when I am making the call.

Is there a way that I can check my image control to make sure I actually
have an image? My thought process is that I would first try 1234, if that
does not bring back an image, I would try 01234, etc....

I do not have control over the api.

Any suggestions are appreciated.

Thanks
 
Hello Tyler,

Just use String.TrimStart to remove the precede zeroes

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

T> I have an image control which I populate using an api url.
T>
T> For example http://getimage.com?id=1234
T>
T> where 1234 is a variable I am passing in.
T>
T> My problem is that the id of the image could be 001234 or 01234.
T> However, I don't know when I am making the call.
T>
T> Is there a way that I can check my image control to make sure I
T> actually have an image? My thought process is that I would first try
T> 1234, if that does not bring back an image, I would try 01234,
T> etc....
T>
T> I do not have control over the api.
T>
T> Any suggestions are appreciated.
T>
T> Thanks
T>
 
Back
Top