image displaying problem

Last post 07-04-2009 12:16 PM by Ibro. 1 replies.

Sort Posts:

  • image displaying problem

    07-04-2009, 4:16 AM
    • Member
      9 point Member
    • amin.net.net
    • Member since 02-11-2009, 5:21 AM
    • Posts 48

     Hello all,

    I am developing a wap site. here I store the image title in database and store the image in my directory. But while read the title and path and then I get only one image. ut I want to show all of my images. my codes are following..........

    while{(reader.Read())

    string imgName = (string)reader["content_title"];

    string imgPaths = (string)reader["content_path"];

    Response.Write(imgName + "<br>");

    Response.Write(imgPaths + "<br>");

    string imgPath = "Images/" + imgPaths;

    img1.ImageUrl += imgPath;

    }

     

    Here i get only the last image. Please help me to sort out this problem.

  • Re: image displaying problem

    07-04-2009, 12:16 PM
    Answer
    • Participant
      1,199 point Participant
    • Ibro
    • Member since 10-08-2008, 10:17 AM
    • Posts 384

     Hi Amin

    the best way to get the images on the web page is to store them in a database table, now you storing the title and the path into a table and images are stored in a folder that is doing double jobs,

    you need to put all in a table in your database, and get a handler page to display and small form to insert into the database table.

    all of these can be found in the following tutorial link good luck and dont forget to mark as answer if this helps you.

    http://aspnet.4guysfromrolla.com/articles/120606-1.aspx

    does this reply help you? mark as an answer
    Ibro
Page 1 of 1 (2 items)