DataBinding images using Repeater Control. Is there an ImageField column?

Discussion in 'ASP .Net' started by Charlie@CBFC, Sep 12, 2006.

  1. Charlie@CBFC

    Charlie@CBFC Guest

    Hi:

    Is it possible to databind an image in Repeater Control? I see support for
    it in GridView, but not in Repeater control. There is another way to do
    this, but would rather go with new controls.

    Thanks,
    Charlie
    Charlie@CBFC, Sep 12, 2006
    #1
    1. Advertising

  2. Charlie@CBFC

    dkode Guest

    Re: DataBinding images using Repeater Control. Is there an ImageField column?

    In the past when I have had the need to do this, the easiest way is to
    put a placeholder in your repeater, then in the ItemDataBound event,
    manually add a System.Web.Image control into the placeholder.

    Perhaps someone has an easier way/more effecient way, I've always used
    that method in the past.

    Hope this Helps!

    Sean

    Charlie@CBFC wrote:
    > Hi:
    >
    > Is it possible to databind an image in Repeater Control? I see support for
    > it in GridView, but not in Repeater control. There is another way to do
    > this, but would rather go with new controls.
    >
    > Thanks,
    > Charlie
    dkode, Sep 12, 2006
    #2
    1. Advertising

  3. Charlie,

    You can use databinding expression in item template to databind any
    properties of any controls. Did you try?

    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]


    "Charlie@CBFC" <> wrote in message
    news:...
    > Hi:
    >
    > Is it possible to databind an image in Repeater Control? I see support
    > for it in GridView, but not in Repeater control. There is another way to
    > do this, but would rather go with new controls.
    >
    > Thanks,
    > Charlie
    >
    Eliyahu Goldin, Sep 13, 2006
    #3
  4. Charlie@CBFC

    Charlie@CBFC Guest

    Yeah but image control only binds to a url. My images are stored in
    database in binary fields. It can be done with an HTTP handler.

    Charlie

    "Eliyahu Goldin" <> wrote in
    message news:...
    > Charlie,
    >
    > You can use databinding expression in item template to databind any
    > properties of any controls. Did you try?
    >
    > --
    > Eliyahu Goldin,
    > Software Developer & Consultant
    > Microsoft MVP [ASP.NET]
    >
    >
    > "Charlie@CBFC" <> wrote in message
    > news:...
    >> Hi:
    >>
    >> Is it possible to databind an image in Repeater Control? I see support
    >> for it in GridView, but not in Repeater control. There is another way to
    >> do this, but would rather go with new controls.
    >>
    >> Thanks,
    >> Charlie
    >>

    >
    >
    Charlie@CBFC, Sep 16, 2006
    #4
    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. =?Utf-8?B?QmVuamFtaW4=?=

    ImageField and BoundField columns in a gridview control:

    =?Utf-8?B?QmVuamFtaW4=?=, Apr 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,682
    =?Utf-8?B?QmVuamFtaW4=?=
    Apr 20, 2004
  2. Replies:
    0
    Views:
    2,867
  3. The Colonel
    Replies:
    1
    Views:
    416
    The Colonel
    Nov 8, 2006
  4. Earl Teigrob
    Replies:
    1
    Views:
    394
    Shravan
    Mar 1, 2004
  5. whyman
    Replies:
    4
    Views:
    905
    whyman
    Mar 23, 2006
Loading...

Share This Page