Image in DetailsView

R

Richard

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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top