Showing Images On DataGrid Column

Discussion in 'ASP .Net Datagrid Control' started by Coder, Jun 8, 2006.

  1. Coder

    Coder Guest

    I am developing a dating site and on this site, in search result page, I
    wanna use a datagrid to show the people information

    One of the column must show images of peoples,and these images will be
    placed on a directory

    How can I do ?
    Coder, Jun 8, 2006
    #1
    1. Advertising

  2. You want the imagefield object. There's a description and code here:

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

    Ken
    Microsoft MVP [ASP.NET]


    "Coder" <> wrote in message
    news:%...
    >I am developing a dating site and on this site, in search result page, I
    >wanna use a datagrid to show the people information
    >
    > One of the column must show images of peoples,and these images will be
    > placed on a directory
    >
    > How can I do ?
    >
    >
    Ken Cox [Microsoft MVP], Jun 9, 2006
    #2
    1. Advertising

  3. use a templateitem and then place the image tag, like

    <templateItem>
    <asp:Image runat="server" id="myImg" ImageUrl='<%#
    String.Format("../images/{0}.jpg", Eval("tImageName") ) %>' />
    </templateItem>

    --

    Bruno Alexandre
    (a Portuguese in KĂžbenhanv, Danmark)


    "Coder" <> escreveu na mensagem
    news:%...
    >I am developing a dating site and on this site, in search result page, I
    >wanna use a datagrid to show the people information
    >
    > One of the column must show images of peoples,and these images will be
    > placed on a directory
    >
    > How can I do ?
    >
    >
    Bruno Alexandre, Jun 11, 2006
    #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. Alek Davis
    Replies:
    4
    Views:
    7,918
    Alek Davis
    Jun 15, 2004
  2. =?Utf-8?B?Slc=?=
    Replies:
    2
    Views:
    4,353
    flymethod
    Dec 9, 2010
  3. Mike P

    showing images in datagrid

    Mike P, Jan 22, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    2,740
    Patrick.O.Ige
    Jan 23, 2006
  4. Ray Booysen
    Replies:
    2
    Views:
    643
    Ray Booysen
    Mar 28, 2006
  5. mldardy
    Replies:
    0
    Views:
    604
    mldardy
    Jan 8, 2009
Loading...

Share This Page