Image in DetailsView

Discussion in 'ASP .Net Web Controls' started by Richard, Mar 13, 2007.

  1. Richard

    Richard Guest

    I've been able to display an image from Sql Server 2005 into a DetailsView
    control, by following articles such as this:
    http://aspnet.4guysfromrolla.com/articles/120606-1.aspx

    I'm using an ObjectDataSource, and I can insert and retrieve the image with
    the DetailsView, no worries. The problem is when I need to edit a field in
    the DetailsView control, such as the title of the image, but not the image
    itself. At this point, the field has a null value (I'm using a FileUpload
    control in my edit template, so it will be empty during an edit). And since I
    can't figure out how to prepopulate the FileUpload control, I don't know how
    to get around the issue of the null value. Either the ObjectDataSource or the
    DetailsView doesn't like the fact that a binary field is being passed a null
    value. Any help would be appreciated!
     
    Richard, Mar 13, 2007
    #1
    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?YWtpcw==?=

    display image in detailsview

    =?Utf-8?B?YWtpcw==?=, Dec 10, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    2,768
    =?Utf-8?B?YWtpcw==?=
    Dec 10, 2005
  2. jens Jensen
    Replies:
    5
    Views:
    7,080
  3. Laszlo Zsolt Nagy
    Replies:
    1
    Views:
    1,432
    Kartic
    Jan 26, 2005
  4. Christian Schlemmer

    asp:Image inside editable DetailsView

    Christian Schlemmer, Nov 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    667
    Christian Schlemmer
    Nov 15, 2006
  5. Feege
    Replies:
    0
    Views:
    502
    Feege
    Dec 20, 2005
Loading...

Share This Page