Load image into database from DetailsView Insert mode
I am trying to upload an image to a database via a DetailsView containing an UploadFile control in an Edit Item template.
I have a stored procedure that handles loading into a SQLServer DB that expects two parameters: AuthorName, varchar (20) and AuthorImage, varbin (20).
DetailsView is associated with SQLDataSource: Authors. The Authors data source has a stored procedure as an Insert command.
I can grab binary data from the UploadFile control during the ItemInserting event, but I don't understand how to bind the byte array to the AuthorImage parameter.
Any and all help is appreciated and if possible C # answers please.
+1
source to share