On Mon, 03 Apr 2006 12:05:19 -0700, jd wrote:
Question from an ASP.Net newbie: using ASP.Net 2.0, how can I iterate
over all the images in a page? The reason: I need to tweak the URLs
for each image (I need to insert an "order id" field so that the proper
image is selected). Thanks...
-- jeff
Let's give it a try. Assuming that all your images are displayed by an asp
control (server control), you can derive a new control inherited from the
sasp.net control and override the render method. You can then do as you
wish in one place without a loop.
Otherwise, you may loop though the controls finding image controls and
change their attributes.