How do I code the src= for an image to pick up value passed in URL as request string?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Suzanne Godau

    How do I code the src= for an image to pick up value passed in URL as request string?

    I am trying to pass an image value from pageA.aspx to pageB.aspx. I am very new to ASP.net and have successfully passed the image name in the URL as Printpage.aspx? Image=dsc00015-1.jpg

    My question is that on PageB I would like to display dsc00015-1.jpg as an image. How to I extract this from the URL and code it in the src= of the image?
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    #2
    you pull the value out of the Request object
    Request.Queryst ring()

    then set the ImageUrl property of your image
    Enjoy!

    Comment

    Working...