display image in gridview

Discussion in 'ASP .Net' started by Stephanie, Dec 9, 2008.

  1. Stephanie

    Stephanie Guest

    I would like to store a file system reference to an image (and not a BLOB
    within SQL Server) in my db. I wuld then like to display that image in a
    gridview. I see a lot of information about the latter but not the former.

    Anyone have a reference that they can point me to? Thanks

    S
    Stephanie, Dec 9, 2008
    #1
    1. Advertising

  2. Stephanie

    Ben Amada Guest

    Stephanie wrote:

    > I would like to store a file system reference to an image (and not a
    > BLOB within SQL Server) in my db. I wuld then like to display that image
    > in a gridview. I see a lot of information about the latter but not the
    > former.
    >
    > Anyone have a reference that they can point me to? Thanks


    You can use an ImageField column in the GridView. The DataImageUrlField
    property can be set to the absolute or relative URL of the image.

    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.imagefield.aspx

    --
    Ben
    http://allben.net/
    Ben Amada, Dec 9, 2008
    #2
    1. Advertising

  3. Stephanie

    Stephanie Guest

    Ben Amada wrote:
    > Stephanie wrote:
    >
    >> I would like to store a file system reference to an image (and not a
    >> BLOB within SQL Server) in my db. I wuld then like to display that
    >> image in a gridview. I see a lot of information about the latter but
    >> not the former.
    >>
    >> Anyone have a reference that they can point me to? Thanks

    >
    > You can use an ImageField column in the GridView. The
    > DataImageUrlField property can be set to the absolute or relative URL
    > of the image.
    > http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.imagefield.aspx


    Thanks!
    Stephanie, Dec 9, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tan

    Display image in GridView

    Tan, Aug 15, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    11,569
    Cacmd
    Jan 13, 2009
  2. Sudha Pune

    Display image on gridview from SQL

    Sudha Pune, Feb 18, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    3,119
    Sudha Pune
    Feb 22, 2006
  3. Auto
    Replies:
    18
    Views:
    18,686
    the4man
    Apr 30, 2006
  4. Auto
    Replies:
    1
    Views:
    3,212
    the4man
    Apr 27, 2006
  5. Auto
    Replies:
    2
    Views:
    232
Loading...

Share This Page